Hays resumed command of the 63rd Pennsylvania during the Northern Virginia Campaign in August and again led a charge in the Second Battle of Bull Run, receiving a painful wound that shattered his leg. While recovering, he was appointed brigadier general of volunteers, September 29, 1862. Early in 1863 Hays was made a brigade commander in XXII Corps in the defenses of Washington, D.C. His brigade, composed largely of troops surrendered after the Battle of Harpers Ferry, was added to the Army of the Potomac as the 3rd Brigade, 3rd Division, II Corps.