Born in Strafford, Vermont, Baxter was the son of Portus Baxter and Ellen Janette Harris. He received his medical degree from the University of Vermont in 1860, completed his internship and residency at Bellevue and Blackwell's Island Hospitals in New York City, and enlisted in the Union Army for the American Civil War. Assigned initially as surgeon of the 12th Massachusetts Volunteer Infantry, he later became a brigade surgeon, commanded Campbell General Hospital in Washington, D.C., and then served as Chief Medical Officer of the Provost Marshal's Bureau. Baxter took part in the Peninsula Campaign, including the Battles of Yorktown, Hanover Court House, and Seven Pines, and attained the rank of major, in addition to receiving brevet promotions to lieutenant colonel and colonel of Volunteers, and a brevet as a colonel in the regular Army.