Fitzgerald began planning his third novel in June 1922, but it was interrupted by production of his play, The Vegetable, in the summer and fall. The play failed miserably, and Fitzgerald worked that winter on magazine stories struggling to pay his debt caused by the production. The stories were, in his words, "all trash and it nearly broke my heart," although included among those stories was "Winter Dreams," which Fitzgerald later described as "a sort of first draft of the Gatsby idea."
After the birth of their only child, Frances Scott "Scottie" Fitzgerald, the Fitzgeralds moved in October 1922 to Great Neck, New York, on Long Island. The town was used as the scene of The Great Gatsby. Fitzgerald's neighbors in Great Neck included such prominent and newly wealthy New Yorkers as writer Ring Lardner, actor Lew Fields, and comedian Ed Wynn. These figures were all considered to be "new money," unlike those who came from Manhasset Neck or Cow Neck Peninsula—places that were home to many of New York's wealthiest established families, and which sat across the bay from Great Neck.
This real-life juxtaposition gave Fitzgerald his idea for "West Egg" and "East Egg." In this novel, Great Neck (Kings Point) became the "new money" peninsula of West Egg and Port Washington (Sands Point) became the "old money" East Egg. Several mansions in the area served as inspiration for Gatsby's home, such as Oheka Castle and Beacon Towers, since demolished. (Another possible inspiration was Land's End, a notable Gold Coast Mansion where Fitzgerald may have attended a party.)
While the Fitzgeralds were living in New York, the Hall-Mills murder case was sensationalized in the daily newspapers over the course of many months, and the highly publicized case likely influenced the plot of Fitzgerald's novel. The case involved the double-murder of a man and his lover which occurred on September 14, 1922, mere weeks before Fitzgerald and his wife arrived in Great Neck. Scholars have speculated that Fitzgerald based certain aspects of the ending of The Great Gatsby as well as various characterizations on this factual incident.
By mid-1923, Fitzgerald had written 18,000 words for his novel, but discarded most of his new story as a false start. Some of it, however, resurfaced in the 1924 short story "Absolution." Work on The Great Gatsby began in earnest in April 1924. Fitzgerald wrote in his ledger, "Out of woods at last and starting novel." He decided to make a departure from the writing process of his previous novels and told Perkins that the novel was to be a "consciously artistic achievement" and a "purely creative work—not trashy imaginings as in my stories but the sustained imagination of a sincere and yet radiant world." Soon after this burst of inspiration, work slowed while the Fitzgeralds made a move to the French Riviera, where a serious crisis[d] in their relationship soon developed.
By August, however, Fitzgerald was hard at work and completed what he believed to be his final manuscript in October, sending the book to his editor, Maxwell Perkins, and agent, Harold Ober, on October 30. The Fitzgeralds then moved to Rome for the winter. Fitzgerald made revisions through the winter after Perkins informed him in a November letter that the character of Gatsby was "somewhat vague" and Gatsby's wealth and business, respectively, needed "the suggestion of an explanation" and should be "adumbrated." Fitzgerald thanked Perkins for his detailed criticisms and stated, "With the aid you've given me I can make Gatsby perfect."
Content after a few rounds of revision, Fitzgerald returned the final batch of revised galleys in the middle of February 1925. Fitzgerald's revisions included an extensive rewriting of Chapter VI and VIII. Further, he refused $10,000 for the serial rights to the book so that it could be published sooner. He had received a $3,939 advance in 1923 and $1,981.25 upon publication.