Their ranks thinned by the almost continuous campaigning, the 7th Maine was ordered home to recruit fresh troops in October. It remained in Portland, Maine, until January 21, 1863, when it was transported back to Northern Virginia. The 7th joined its brigade and division at White Oak Church on January 25. It then took part in the operations at Franklin's Crossing from April 29-May 2 during the Chancellorsville Campaign. It was part of the successful attack on Maryes Heights during the Second Battle of Fredericksburg on May 3 and the fight at Salem Church on May 3–4. The 7th participated in the great Battle of Gettysburg on July 2–4, and engaged the Confederates several times during their subsequent retreat to Virginia (actions were at Fairfield July 5 and near Funkstown, Maryland, on July 10–13). During the autumn, the regiment was involved in the Bristoe Campaign from October 9–22 and the Battle of Rappahannock Station on November 7. It then participated in the Mine Run Campaign from November 26-December 2.