Yorktown was named for the ancient city of York in Yorkshire, Northern England. It was founded in 1691 as a port on the York River for English colonists to export tobacco to Europe. The lawyer Thomas Ballard was the principal founder of the city along with Joseph Ring. It became the county seat in 1696, and although it never had more than about 200 houses its trade was considerable until the American Revolutionary War. It was called "York" until after the war, when the name "Yorktown" came into common use.
The town reached the height of its development around 1750, when it had 250 to 300 buildings and a population of almost 2,000 people. It was the base of British General Charles Cornwallis during the 1781 siege, which was the last major battle of the American Revolutionary War.
When waterways were critical to transportation, Yorktown was thought to occupy a strategic location controlling upstream portions of the York River and its tributaries and their access to the Chesapeake Bay. In his Notes on the State of Virginia published in 1781–82, Thomas Jefferson noted that the York River at Yorktown "affords the best harbour in the state for vessels of the largest size. The river there narrows to the width of a mile, and is contained within very high banks, close under which the vessels may ride."
The population dropped in Yorktown and other areas of the mostly rural peninsula after the state's capital was relocated from Williamsburg to Richmond on the James River, attracting more development there. In addition, tobacco exhausted the soil, and planters shifted to mixed crops, which required less slave labor. Many generations of younger sons migrated out of the Tidewater area to new lands further west, into the Piedmont and beyond to Kentucky, Tennessee and what became the Northwest Territory.