From 1861 to 1862 there was a Confederate campaign against the Baltimore and Ohio Railroad Company. B and O lines were used to move Union army supplies. During the Civil War, the president of the Baltimore and Ohio Railroad company John W Garrett did whatever he could to prevent attacks and keep his railroad lines safe. But the Confederacy still attacked the Baltimore and Ohio railroad many times between 1861 and 1862. Among the targets of the Confederate raid was the Martinsburg Roundhouse.
General Thomas Jackson and his soldiers were ordered by General George Sharpe to capture and destroy trains in Martinsburg. During the night Jackson and his troops burned down and completely destroyed the Roundhouse in 1862.
Among their other targets, Confederate soldiers removed a total of 14 trains belonging to the B and O railroad. These locomotive engines were taken to Strasburg, Virginia and took thousands of dollars worth of tools and materials. Yet due to northern and southern railroad tracks having different sizes in the space in between the rails, the Confederacy was unable to use the Baltimore and Ohio Company train engines.
This raid hurt Martinsburg because many jobs were lost when the Roundhouse was burned, affecting the town's sentiments towards the Confederates.
In 1866, a year after the end of the Civil War, a roundhouse was rebuilt in Martinsburg.