John B . Magruder John Bankhead Magruder ( May 1 , 1807 – February 19 , 1871 ) was a career military officer who served in the armies of three nations . He was a U . S . Army officer in the Mexican - American War , a Confederate general during the American Civil War , and a postbellum general in the Imperial Mexican Army . Known as " Prince John " to his army friends , Magruder was most noted for his actions in delaying Federal troops during the 1862 Peninsula Campaign through elaborate ruses that gave Maj . Gen . George B . McClellan the impression that the Confederates had more forces than in actuality , and in successfully defending Galveston , Texas , against the Union Army and Navy early in 1863 . Early years and career . Magruder was born in Port Royal , Virginia to Thomas and Elizabeth Magruder . He first attended the University of Virginia , where he had the opportunity to dine with former President Thomas Jefferson . He graduated from the United States Military Academy in 1830 , where he was the roommate of William N . Pendleton . He was commissioned a second lieutenant in the 7th U . S . Infantry regiment . He was later assigned to the 1st U . S . Artillery . Magruder served in the Second Seminole War in Florida and then under Winfield Scott in the Army of Occupation in Mexico . He was appointed a brevet major for " gallant and meritorious conduct " at the Battle of Cerro Gordo and lieutenant colonel for his bravery in the storming of Chapultepec . He served on frontier duty in California and at Fort Leavenworth in the Kansas Territory . " Prince John " spoke with a lisp , except when singing tenor , which he did frequently . His avocation was composing songs and staging concerts and amateur theater productions , something to relieve the tedium of peacetime garrison duty . This theatrical bent would come in handy in the Civil War . Civil War . At the start of the Civil War , Magruder was assigned to the artillery in the garrison forces of Washington , D . C . . However , he resigned from the U . S . Army when his native Virginia seceded , whereupon he was commissioned a colonel in the Confederate States Army . He was quickly promoted to brigadier general ( June 1861 ) and major general ( October 1861 ) . He commanded the small Army of the Peninsula defending Richmond , against Maj . Gen . George B . McClellan ' s invasion of the Virginia Peninsula in the early portion of the Union ' s Peninsula Campaign in 1862 . This separate army was incorporated as a division in the Army of Northern Virginia on April 12 , 1862 . During the Battle of Yorktown , Magruder completely deceived McClellan as to his strength by ostentatiously marching small numbers of troops past the same position multiple times , appearing to be a larger force . He moved his artillery around frequently and liberally used ammunition when Union troops were sighted , giving the impression of a large , aggressive defending force . This subterfuge caused McClellan ' s Army of the Potomac weeks of needless delay and brought Magruder praise from his superior , Gen . Joseph E . Johnston . However , Magruder performed poorly and unaggressively in the subsequent Seven Days Battles . Some blame heavy drinking for his erratic performance , others point to the unrelenting stress of his fending off McClellan at Yorktown . At the Battle of Malvern Hill , the last of the Seven Days , local guides led him and his men astray , causing a considerable delay in his arrival in the line of battle . Orders from new commander Robert E . Lee to attack , dispatched earlier in the day but with no time marked on them , were received only after Magruder finally got into proper position some hours later . They were mistaken as currently issued ; the error was compounded when fresh orders from Lee arrived which , based on faulty intelligence , reaffirmed the attack . Magruder ' s execution of those orders as if they were current and accurate resulted in an uncoordinated assault that suffered considerable losses and made no headway . Lee afterward , when he personally surveyed the field , thought that no commander on the scene should have gone ahead with an attack . When he asked Magruder , " Why did you attack ? " Magruder replied , " In obedience to your orders , twice repeated . " Lee reorganized his army after the Seven Days , replacing those he thought were ineffective commanders , and Magruder was soon reassigned to command the District of Texas , New Mexico , and Arizona . On January 1 , 1863 , Magruder ' s forces won the Battle of Galveston , recapturing the city and port for the Confederacy . The First Confederate Congress published its official thanks : From August 1864 to March 1865 , Magruder commanded the Department of Arkansas but then returned to command the District of Texas , New Mexico , and Arizona during the last months of the war until the entire Trans - Mississippi region was surrendered by General Edmund Kirby Smith . Postbellum career . After the war , Magruder fled to Mexico and entered the service of Emperor Maximilian I of Mexico . He was a major general in the Imperial Mexican Army . However , by May 1867 , the emperor ' s forces had succumbed to a siege and the emperor had been executed . Magruder returned to the United States and settled in Houston , Texas , where he died in 1871 . He is buried in the Episcopal Cemetery at Galveston , the scene of his greatest military success . Honors . A number of geographic features have been named in honor of John Magruder :