Anderson married Sara Eliza Archer, daughter of Dr. Robert Archer, the post surgeon at Fort Monroe at the entrance to Hampton Roads in Elizabeth City County, Virginia. Seeking better prospects than army life promised, in 1837, he resigned to work as a civil engineer with Virginia State Engineer Claudius Crozet, who had earlier been a professor of engineering at West Point. Under the Virginia Board of Public Works, Anderson became Assistant State Engineer and served was chief engineer of the Valley Turnpike Company, a toll road which extended between Staunton and Winchester, Virginia in the Shenandoah Valley from 1838 until 1841.