Virgil is a town in Cortland County, New York, United States. The population was 2,401 at the 2010 census. The name is from the Roman poet Virgil. The town is in the southwest part of Cortland County and is south of the city of Cortland.
The region was part of the Central New York Military Tract used to pay soldiers of the American Revolution. "Virgil" was the name of one of the townships of the Military Tract, this name being assigned by a clerk interested in the Classics.
Virgil was first settled around 1792. The town was formed from the town of Homer in 1804. Virgil was reduced by the formation of the towns of Harford and Lapeer in 1845. Virgil also lost territory to the towns of Cortlandville and Freetown.
In 1865, the population was 2,009.