During the Maryland Campaign in September 1862, 9th Vermont was part of the Federal garrison that was forced to surrender to Stonewall Jackson at Harpers Ferry. Stannard was conspicuous in the defense of Bolivar Heights against Jackson's attack. Col. William H. Trimble, his brigade commander, had Stannard accompany him in an inspection of the Union lines in that sector. Both thought the southern end of the line weak. Stannard clearly had no confidence in Col. Dixon Miles, the garrison commander, but he displayed his own coolness under fire by watching for Confederate artillery action in order to tell his men to drop to the ground. Stannard is reported to have tried to extract his regiment from Harpers Ferry before the surrender could take effect, but he was intercepted with orders to yield to the Confederates.