Mexican–American War
Effect on the American military in the Civil War

Many of the military leaders on both sides of the American Civil War of 1861–1865 had trained at the U.S. Military Academy at West Point and had fought as junior officers in Mexico. This list includes military men fighting for the Union: Ulysses S. Grant, George B. McClellan, William T. Sherman, George Meade, and Ambrose Burnside. Military men who joined the Southern secessionists of the Confederacy included Robert E. Lee, Albert Sidney Johnston, Stonewall Jackson, James Longstreet, Joseph E. Johnston, Braxton Bragg, Sterling Price, and the future Confederate President Jefferson Davis. Both sides had leaders with significant experience in active combat, strategy, and tactics.

For Grant, who went on to lead Union forces in the Civil War and later was elected president, "it also tutored him in the manifold ways wars are shot through with political calculations." Grant had served in Mexico under General Zachary Taylor and was appointed acting assistant quartermaster for Taylor's army, a post he tried to decline since it took him away from the battlefield. However, "The appointment was actually a godsend for Grant, turning him into a complete soldier, adept at every facet of army life, especially logistics... This provided invaluable training for the Civil War when Grant would need to sustain gigantic armies in the field, distant from northern supply depots." Grant saw considerable combat and demonstrated his coolness under fire. In the Battle of Chapultepec, he and his men hoisted a howitzer into a church belfry that had a commanding view of the San Cosme gate. The action brought him the honorary rank of brevet captain, for "gallant and meritorious conduct in the battle of Chapultepec."

Grant later recalled in his Memoirs, published in 1885, that "Generally, the officers of the army were indifferent whether the annexation was consummated or not; but not so all of them. For myself, I was bitterly opposed to the measure, and to this day regard the war, which resulted, as one of the most unjust ever waged by a stronger against a weaker nation. It was an instance of a republic following the bad example of European monarchies, in not considering justice in their desire to acquire additional territory." Grant also expressed the view that the war against Mexico had brought punishment on the United States in the form of the American Civil War. "The Southern rebellion was largely the outgrowth of the Mexican war. Nations, like individuals, are punished for their transgressions. We got our punishment in the most sanguinary and expensive war of modern times."

Robert E. Lee, commander of the Confederate forces through the end of the Civil War, began building his reputation as a military officer in America's war against Mexico. At the start of the Mexican–American War, Captain Lee invaded Mexico with General Wool's engineering department from the North. By early 1847, he helped take the Mexican cities of Vera Cruz, Cerro Gordo, Contreras, Churubusco, Molino del Rey, and Chapultepec. Lee was wounded in Chapultepec. General Scott described Robert E. Lee as "gallant and indefatigable", saying that Lee had displayed the "greatest feat of physical and moral courage performed by any individual in knowledge during the campaign". Grant gained insight into Robert E. Lee, as his memoir states, "I had known him personally, and knew that he was mortal; and it was just as well that I felt this."

In 1861, General Scott advised Abraham Lincoln to ask Lee to command U.S. forces. Lee declined and later recounted "I declined the offer he made me to take command of the army that was brought into the field, stating candidly and as courteously as I could that though opposed to secession and deprecating war, I could take no part in the invasion of the southern states."
oulipo:avoid_letter[o]