According to Luc Sante in his excellent work of New York History, “Low Life : Lures and Snares of Old New York” (http://shop.barnesandnoble.com/booksearch/isbnInquiry.asp?isbn=0679738762) says that New York, back when everyone used horses and the city wasn’t kept particularly clean, was called “The Big Onion” or “The Big Smear” because of its odor.
After the Civil War, it was cleaned up by military-like brigades, and the someone redubbed it “The Big Apple” in an attempt to clean up the image.
Or so says Luc…