In the 1864 spring reorganization of the Army of the Potomac, the 23rd Pennsylvania was reassigned to the 4th Brigade, 1st Division, VI Corps. At the beginning of the Overland Campaign, it guarded prisoners, rejoining the Army near the end of the Battle of North Anna. At the Battle of Cold Harbor, the 23rd lost 4 officers and 71 enlisted men killed, 5 officers and 111 enlisted men wounded, and 3 men captured in the ill-fated June 3 attack on the Confederate lines. After several days of additional skirmishing, the regiment was transferred with the rest of the corps to Bermuda Hundred and from there crossed the Appomattox River. Over the next few weeks, the unit fought in various actions during the Siege of Petersburg.