Before his military career, Pillow practiced law and was active in Democratic Party politics. He was a floor leader in support of the nomination of fellow-Tennessean James K. Polk at the 1844 Democratic National Convention. In 1847, Pillow was commissioned a brigadier general of volunteers to serve in the Mexican–American War, and was later promoted to major general. He performed reasonably well, and was wounded that year at Cerro Gordo and Chapultepec. However, controversy arose when, in a series of letters, Pillow tried to take what was perceived by some as undue credit for American victories at the expense of his commander, Major General Winfield Scott. Pillow was court-martialed for insubordination, but with President Polk's assistance, the court-martial was reduced to a court of inquiry, which in 1848 exonerated Pillow.