During the American Civil War, he enlisted in the 12th New York State Militia in April 1861, and was discharged in August. He enlisted in September 1861 in the 1st New York Engineers, and took part in the battles of Port Royal, Fort Pulaski, James Island and others in the Department of the South until December 1863 when he was discharged as a sergeant-major and brevet second lieutenant. He was a clerk in the U.S. Department of War from 1864 to 1867.