Farmington is a city in Dakota County, Minnesota, United States. The population was 21,086 at the 2010 census. It is a part of the Minneapolis-St. Paul metropolitan area.
Settlers began arriving in Empire Township, in which Farmington grew, in the early 1850s. The village of Dakota City began around the intersection of the Minnesota Central, Hastings, and Dakota railroads, and also the Vermillion River. The popular city train station in Dakota City was Farmington Station and non-residents began confusing the two names and identifying the town as Farmington. The town's name was then permanently changed from Dakota City to Farmington. The present name was given for the numerous farms near the original town site. Farmington received its village charter in 1872 making Farmington the second oldest community in Dakota County after the county seat, Hastings.
A notable event in Farmington's history is the movement of the Dakota County Fair to Farmington in 1869.