Rubuta ci gaba don wannan sakin layi - A watan Agusta 1845, Magruder ya ba da kansa don aiki a Corpus Christi, Texas, don shiga rundunar Janar Zachary Taylor a can, suna mamaye tsohuwar jamhuriya; Amurka tana gab da yakin da Mexico game da batun hadewa. Bayan tashin hankali ya buɗe a ranar 25 ga Afrilu, 1846, Magruder ya fara ganin yaƙi a Yaƙin Palo Alto
, kwanaki 14 bayan haka. A ranar 18 ga Afrilu, 1847, Magruder ya yi aiki tare da "himma da iyawa", a cikin Janar Winfield Scott, a karkashin mummunar wuta kuma ya juya bindigogi na Mexico a kan su a Cerro Gordo, wanda ya sami yabo daga shugabanninsa kuma ya ba da izini ga manyan. A ranar 12 ga watan Satumba, sojojin Amurka sun fara kai hari kan Chapultepec, a cikin jerin jerin gwagwarmaya a yakin Mexico City. Magruder - wanda ya ji rauni - ya ba da umurni na farko a cikin safiya a ranar 13th kuma ya ba da izinin bin, duk da yawan mutanen Mexico, don kama Anzures, Veronica, da kuma Belen junction - wata hanya mai mahimmanci wanda zai toshe kokarin Janar Santa Anna don sauƙaƙe fadar.