During the Maryland Campaign of September 1862, Archer was suffering from an illness that forced him to direct his brigade from an ambulance, being too sick to ride his horse. His men made a forced march from Harpers Ferry and arrived in Sharpsburg on the left flank of the Union IX Corps. Archer's brigade helped drive back the Union IX Corps, but Archer himself was unable to participate in the battle due to illness and a colonel commanded the brigade instead. Three days later at the Battle of Shepherdstown, Archer and Brig. Gen. William Dorsey Pender led an attack that drove a Union pursuit force back across the Potomac River, enabling Lee's army to slip away into Virginia. Despite his continued ill health, Archer's leadership contributed to victories at the battles of Fredericksburg and Chancellorsville.