During the Maryland Campaign, General Cadmus Wilcox's brigade was added to Anderson's command. At the Battle of Antietam in September 1862, he was in overall command at the sunken road, or "Bloody Lane", in the center of the Confederate defense. He was wounded in the thigh and left the battle. His senior brigadier Roger A. Pryor took over command. After Anderson's departure, his division began to falter and eventually succumb to Union flank attacks that routed them from their position. At the Battle of Fredericksburg that December, his division was not heavily engaged.