Mercer County is a county located in the U.S. Commonwealth of Kentucky. As of the 2010 census, the population was 21,331. Its county seat is Harrodsburg. The county was formed from Lincoln County, Virginia in 1785 and is named for Revolutionary War General Hugh Mercer, who was killed at the Battle of Princeton in 1777.