Lieutenant Ripley served in the Mexican–American War on the staffs of Gen. Zachary Taylor and Gen. Gideon Pillow, and saw action at the battles of Monterey, Vera Cruz, Cerro Gordo, Contreras, Churubusco, Molino del Rey, Chapultepec, and the capture of Mexico City. For gallantry in action, Ripley was brevetted captain for Cerro Gordo and major for Chapultepec. He published a "History of the Mexican War" (2 vols., New York, 1849).