He entered the Mexican–American War as a first lieutenant and was cited for bravery and noteworthy service at the Battles of Contreras and Churubusco. His valor displayed at the Battle of Chapultepec earned for him a brevet promotion to the rank of captain. In March 1855 Palmer was promoted to the full rank of captain in the 2nd U.S. Cavalry.
He entered the Mexican–American War as a first lieutenant and was recognized for bravery and notable service at the Battles of Contreras and Churubusco. His valor displayed during the Battle of Chapultepec earned him an honorary promotion to captain. In March 1855, Palmer was officially promoted to the rank of captain in the 2nd U.S. Cavalry.