Following a private education appropriate for his class, Randolph briefly attended preparatory schools in Cambridge, Massachusetts (under the direction of his brother in law Joseph Coolidge) and Washington, D.C., where his mother sent him to give him distance from Virginia politics and family troubles. His father had incurred much debt, and creditors foreclosed after his term as Virginia's 21st governor ended. However, his elder brother Thomas Jefferson Randolph managed to buy the family's Edgehill plantation at a foreclosure auction in 1826. Meanwhile, G.W. Randolph became a midshipman in the United States Navy from 1831 to 1839, sailing on the "USS John Adams" and "USS Constitution" in the Mediterranean Sea as well as training at the Naval School in Norfolk, Virginia. Randolph also began attending the University of Virginia in Charlottesville near his home during his naval service in 1837, perhaps while recovering from tuberculosis contracted during his naval voyages (which went into a very long remission but which ultimately proved fatal).