There are several different theories on how New York City earned the nickname "The Big Apple," each with a certain amount of truth to them. It appears that city officials did not officially adopt the moniker until 1971, although many residents and visitors had been using the nickname since the 1920s. The 1971 campaign to popularize New York City as the Big Apple included volunteers handing out real apples to passing tourists. Through this promotion, the city hoped to generate a more positive perception of New York City, and all it had to offer as one of the world's largest cities.
The first reference to New York City as by this name is believed to have appeared in 1909. A man named Martin Wayfarer allegedly criticized the disproportional amount of the nation's money New York City received annually. He compared the country's economy to a tree with many roots, but the "big apple" (New York City) received the bulk of the "sap." It's very possible that residents of New York City may have embraced that critical reference as a source of civic pride. Living in the city meant enjoying the benefits of a robust economy.