Hannibal is a town in Oswego County, New York, USA. The population was 4,957 at the 2000 census. The name is derived from the hero of ancient Carthage, Hannibal.
The Town of Hannibal also contains a village also called Hannibal. The town is on the west border of the county.
The first settlement occurred around 1802. Much of the region was purchased from the Onondaga and Oneida tribes to form the Central New York Military Tract to pay off war veterans. The town was formed in 1806 from the Town of Lysander while still part of Onondaga County, New York. The name was provided by Robert Harpur, an employee of the New York survey, who is responsible for many of the "classical" names applied to political entities in the central part of New York.