Tremain served as a volunteer throughout the Civil War. He retired with the brevet rank of brigadier general in April of 1866. He was present at numerous major battles and campaigns including Fredericksburg, Chancellorsville, Second Bull Run, Gettysburg, Chattanooga and Petersburg. In the latter half of the war he was an aide-de-camp with the United States Volunteers.