The 31st Regiment Maine Volunteer Infantry was organized at Augusta, Maine, in March and April 1864 and mustered into service on April 17, 1864, for a three-year enlistment. The regiment left Maine for Washington, D.C. on April 18, 1864, and was attached to the 2nd Brigade, 2nd Division, IX Corps, Army of the Potomac, in which it remained for the remainder of the war. The 31st commenced active campaigning on May 4, 1864, and took its first battle casualties two days later in the Battle of the Wilderness, where it suffered heavy losses. The regiment fought again at Spotsylvania Court House on May 12, again taking heavy casualties: 12 killed, 75 wounded and 108 missing in action. The regiment fought in engagements at Totopotomoy Creek on May 31 and June 1. Between the 4th and 12 June, the regiment was before the Confederate works at Cold Harbor, then crossed the James River and fought in the Battle of Petersburg and then remained there for the remainder of the siege. In the July 30 Battle of the Crater, it was the first regiment into the Confederate works and lost heavily in the failed assault. The 31st was in support during the Second Battle of the Weldon Railroad, followed by the Battle of Poplar Springs Church on September 30. October 1864 was spent on picket duty and drill where it absorbed the 4th and 6th Companies of Maine Unassigned Infantry as companies L and M. On October 27, it was assigned to Fort Fisher, where they remained until the end of November when it was reassigned as the garrison of Fort Davis. The 31st Maine absorbed the 32nd Maine Regiment on December 12, 1864, adding 15 officers and 470 enlisted men to its ranks. The regiment remained in reserve from February 11, 1865, until the early morning of April 2, when it was chosen to provide the initial storming party of three companies for the assault on Fort Mahone. The regiment suffered heavy losses in the attack.. It participated in the occupation of Petersburg and spent the rest of the campaign gathering up prisoners and escorting them to the rear. On April 29, the regiment marched to City Point, Virginia and sailed to Alexandria, Virginia, arriving at that city on the 27th. The regiment participated in the Grand Review of the Armies on May 23, 1865, and was mustered out of service on July 15, 1865. The Regiment, and the Battle of the Crater in general, is portrayed in the film Cold Mountain.
Total strength and casualties
1,595 men served in the 31st Maine Infantry Regiment at one point or another during its service. It lost 183 enlisted men killed in action or died of wounds. 491 men were wounded in action, 176 died of disease, and 34 died in Confederate prisons, and 18 officer deaths, for a total of 411 fatalities from all causes.