Jamestown was picked for its military advantages. It had a deep-water mooring for the ships, it was far enough up the James to be out of sight of the fearsome Spanish, and it was a semi-island--protected on three sides by the river and marshes.
But this swampy location was unhealthy. Fresh water was a major problem, and often the colonists were reduced to drinking the brackish river water. As a result, Malaria and dysentery periodically caused sickness and death. Also, there were fires in Jamestown, and the city itsel was burned down twice. Bacon burned it during his famous Rebellion, and a few years later it burned down again by accident. When the fourth State House burned in 1698, the site was abandoned, and the capitol moved to Williamsburg.