Leavitt served as the captain of the 16th Maine Volunteers in 1862, becoming the major in 1863. He was mortally wounded in the battle of Laurel Hill, Virginia and died in Washington D.C. in 1864.