 He led his North Carolina brigade in the September 1862 invasion of Maryland and participated in the capture of Harpers Ferry and the Battle of Antietam.On November 7, he was placed in temporary command of the division and led it through the Battle of Fredericksburg, where Ransom's division had successfully defended Marye's Heights against the attacking Federals.In January 1863, Ransom and his brigade were sent back to North Carolina.