At the start of the Civil War, Andrews assisted with the organization of the 2nd Regiment Massachusetts Volunteer Infantry of which he was appointed lieutenant colonel.
In early September, Banks was reassigned to the defenses of Washington and his forces were re-organized, becoming the XII Corps in the Army of the Potomac, and took part in the Maryland Campaign.
The regiment took part in the assaults on the Confederate position through the infamous Cornfield and suffered heavy casualties before being forced to make an orderly retreat.
[1] As a key member of Banks's staff, Andrews spent the winter of 1862–1863 in New York City, playing a major role in organization and planning the expedition.
[2] Banks replaced Maj. Gen. Benjamin Butler as commander of the Department of the Gulf and intended to move north from New Orleans with a large force to assist in taking control of the Mississippi River.
[2] He was briefly placed in command of the 1st Brigade, 3rd Division, XIX Corps but less than a month later, in March 1863, Andrews was appointed chief of staff to Maj. Gen.
[8] The day after the fall of Port Hudson, Andrews was assigned to organize the African-American troops in the Army of the Gulf, forming the Corps d'Afrique.
[3] On February 27, Andrews was relieved from command of the District of Baton Rouge and Port Hudson and reported to New Orleans where he was appointed provost marshal general for the Department of the Gulf.
[3] After the Confederacy's surrender in April 1865, Andrews spent a portion of the summer as Maj. Gen. Canby's chief of staff, then resigned his commission on August 24, 1865.