McDonald joined the Confederate States Army on April 27, 1861 and was commissioned as a Lieutenant and engineer officer.
Then he served as inspector general of the staff of his former professor, Lieutenant General Stonewall Jackson.
McDonald later served as staff officer for Major General Martin Luther Smith and as an engineer officer for Lieutenant General John C. Pemberton after being transferred to New Orleans.

While serving as chief engineer under Pemberton, McDonald was taken as a prisoner of war by the Union Army at Vicksburg, Mississippi in 1863.
During the war, McDonald and other former cadets returned to the Virginia Military Institute to instruct pupils while on parole or recuperating from injuries.
In 1864 while McDonald was on parole, one of his students, John Sergeant Wise, recounted of having McDonald as a professor: 'Marshall McDonald hobbles in to point with his crutch at the problems on the black-board, until he can once more point with his sword towards "the looming bastion fringed with fire."'
Of the professors at the institute during the war, Wise remarked, "they taught with a zest and freshness as we seldom see."

McDonald was further promoted to the rank of Major in command of engineers on the staff of General Braxton Bragg and was to be promoted to the ranks of Colonel and Brigadier General when the war ended.
While serving as an officer in an engineer corps, McDonald saw "much active service."
McDonald and his four brothers served with distinction in the Confederate States Army, but only three of his brothers survived the war.
McDonald's father was one of the first Hampshire County residents to volunteer to fight for the Confederacy in 1861 and was commissioned as Colonel in command of the 7th Virginia Cavalry Regiment.
McDonald's father died in Richmond, Virginia in 1864.
McDonald joined the Confederate States Army on April 27, 1861 and was commissioned as a Lieutenant and engineer officer. Then he served as inspector general of the staff of his former professor, Lieutenant General Stonewall Jackson. McDonald later served as staff officer for Major General Martin Luther Smith and as an engineer officer for Lieutenant General John C. Pemberton after being transferred to New Orleans.
While serving as chief engineer under Pemberton, McDonald was taken as a prisoner of war by the Union Army at Vicksburg, Mississippi in 1863. During the war, McDonald and other former cadets returned to the Virginia Military Institute to instruct pupils while on parole or recuperating from injuries. In 1864 while McDonald was on parole, one of his students, John Sergeant Wise, recounted of having McDonald as a professor: 'Marshall McDonald hobbles in to point with his crutch at the problems on the black-board, until he can once more point with his sword towards "the looming bastion fringed with fire."' Of the professors at the institute during the war, Wise remarked, "they taught with a zest and freshness as we seldom see."
McDonald was further promoted to the rank of Major in command of engineers on the staff of General Braxton Bragg and was to be promoted to the ranks of Colonel and Brigadier General when the war ended. While serving as an officer in an engineer corps, McDonald saw "much active service." McDonald and his four brothers served with distinction in the Confederate States Army, but only three of his brothers survived the war. McDonald's father was one of the first Hampshire County residents to volunteer to fight for the Confederacy in 1861 and was commissioned as Colonel in command of the 7th Virginia Cavalry Regiment. McDonald's father died in Richmond, Virginia in 1864.
Marshall McDonald