Middleburg is an unincorporated area and census-designated place (CDP) within Clay County in the U.S. state of Florida, located 26 mi southwest of downtown Jacksonville and 16 mi northwest of Green Cove Springs, the county seat of Clay County. As of the 2020 census, the population of Middleburg was 12,881.