Gracie was forced to sell the mansion after a series of financial setbacks after the War of 1812, which limited shipping across the Atlantic. The home sold in 1823 to Joseph Foulke, who owned the home until 1857 when Noah Wheaton purchased the property. Wheaton would maintain the house, though it began to fall into disrepair over the years, until 1896 when the City of New York acquired the property because of unpaid taxes.
The City of New York did little to preserve Gracie Mansion for decades. Instead, it served as a place for concessions and restrooms for visitors to Carl Schurz Park. However, the City finally decided to renovate the house, and in 1923, it became the first location for the Museum of the City of New York. The Museum ultimately outgrew the mansion and moved to Fifth Avenue in 1932. After more renovations, Gracie Mansion served as a house museum, representing early Federalist architecture in New York City.
In 1942, thanks to the efforts of Park Commissioner Robert Moses, Gracie Mansion became the home of the Mayor of New York. Mayors lived in their own homes before this. Fiorello H. La Guardia was the first mayor to take up residence in the home. At first, La Guardia refused to move into the home, but he was eventually forced to move in by Moses.
The Mansion was expanded in 1960 with a wing added for guests and official business since the residence was too small to house the Mayor's family and entertain company. This new wing was named after Mayor Robert Wagner's wife, Susan, who initiated the plans for the additional wing and died while it was being built. Other additions and renovations have been completed on the house as mayors have moved in and out. Though many New York City mayors have decided to stay in their own homes, the house still serves as the official residence of the Mayor of New York City.