In 1848, he accepted a position as professor of mathematics and acting president of the College of William and Mary in Williamsburg, Virginia. He purchased a farm in nearby James City County west of the old colonial capital city along the Richmond-Williamsburg Stage Road (now U.S. Route 60) and built a large plantation house there which became known as Ewell Hall. He was later named permanent president, and served in that capacity between 1854 and 1888, even between 1861 and 1865 when the college was in abeyance.