The nickname comes from horse racing, at least as far back as it can be traced.
Prior to some bloodhound work done by Gerald Cohen, a professor at the University of Missouri, and Barry Popik, a municipal New York City judge, the most widely held belief was that the term "the big apple" was derived from jazz musicians of the 1930s. We know now, however, that it was in print long before that.
Through the efforts of Cohen and Popik, it was discovered that "the big apple" came to us via horse racing. In the 1920s New York City was considered akin to the Kentucky Derby of horse racing; it was a place every owner and jockey dreamed of racing. On a trip to Louisiana, New York City sports writer John J. Fitz Gerald heard some stable hands expressing how they hoped they could make it to "the big apple" to race. They presumably meant by this that it (the apple) was the grand prize for a horse. He returned to New York and used it in his column when referring to the local tracks. Later, he even changed the name of his weekly racing column to "Around the Big Apple". At this point, the local jazz musicians picked up the term in the sense of a prize venue in which to play. For example, "I've got a gig in the Big Apple (Manhattan) this weekend." Over time, instead of picking up steam, the term fell out of use, and by the 1970s it was rarely heard anymore.
In 1971, however, the New York Convention and Visitors Bureau began a campaign to present the city in its best light, and someone decided that a bright red apple would be just the symbol to represent the city. Part of the campaign was to use the apple symbol and "Big Apple" on T-shirts, bumper stickers, buttons, etc. Nowadays, the term is synonymous with New York City, and is known not only in the United States, but all over the world.
