His first job was to serve as principal of Brown High School in Newburyport, Massachusetts. During the Civil War he enlisted and was promoted to captain of the 48th Massachusetts Infantry. He was stationed during his year of duty (1862–1863) in Louisiana. He took part in the siege and capture of Port Hudson under General Nathaniel P. Banks. Following his year of service he returned to being principal of Brown High School. He married Fanny Stone Balch on September 30, 1863. They had nine children, five of whom died before reaching the age of ten.