From Wikipedia.org:

Square Co., Ltd. first entered the Japanese video game industry in the mid 1980s, developing a variety of simple RPGs for Nintendo's Famicom Disk System (FDS), a disk-based peripheral for the Family Computer (also known as the "Famicom," and known internationally as the Nintendo Entertainment System). By 1987, declining interest in the FDS had placed Square on the verge of bankruptcy. At approximately the same time, Square designer Hironobu Sakaguchi began work on an ambitious new fantasy role playing game for the cartridge-based Famicom, inspired in part by Enix's popular Dragon Quest (known to some in the United States as Dragon Warrior). <SUP class=reference id=_ref-1>[2]</SUP> Sakaguchi had plans to retire after the completion of the project so he named it Final Fantasy because it was his final game, although it was also going to be Square's final game. In fact, it's commonly believed that the game was named Final Fantasy because of Square and not Sakaguchi, although Sakaguchi himself has confirmed it was named because of his plans for retirement. Either way, Final Fantasy turned out to be far from Square's or Sakaguchi's last game. Final Fantasy reversed Square's lagging fortunes, and became their flagship franchise.