After General Burnside was transferred to Virginia, Foster assumed command of the Department of North Carolina. He was promoted to major general of volunteers on July 18, 1862, and led the . During Confederate Lieutenant General James Longstreet's Tidewater Campaign, upon hearing of a planned Confederate attack on Washington, North Carolina, Foster personally assumed command of its defenses. When D. H. Hill demanded the surrender of Washington, Foster defiantly replied, "If you want Washington, come and get it." Hill's forces besieged the garrison and two Union relief expeditions were turned back. Foster escaped the besieged city in order to personally lead a relief column back. Hill withdrew his forces shortly afterward. Both Confederate and Union forces burned down much of the town. In December, Foster led the Goldsboro campaign won two minor battle at Kinston and Goldsboro against inferior confederate forces led by brigadier general Nathan G. Evans, resulting in the shutdown of the vital Confederate supply line of the Wilmington and Weldon Railroad for merely two weeks.