Hannibal is a city in Marion and Ralls counties in the U.S. state of Missouri. Interstate 72 and U.S. Routes 24, 36, and 61 intersect in the city, which is located along the Mississippi River approximately 100 miles northwest of St. Louis. According to the 2010 U.S. Census, the population was 17,606, making it the largest city in Marion County.Hannibal is not the county seat, but it has one of two county courthouses. There is also one in Palmyra, the county seat, which is located more in the center of the county. This is the principal city of the Hannibal, Missouri micropolitan area, which consists of both Marion and Ralls counties.