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.
The novelist William Gilmore Simms was living on the island at the time, and tells of an incident during their courtship involving Ripley's boots and a barman.
On August 15, 1861, he was appointed as a brigadier general in the Confederate Army and assigned command of the Department of South Carolina and its coastal defenses.
Assigned to the Army of Northern Virginia, Ripley's Brigade participated in the battles of Mechanicsville, Gaines Mill, and Malvern Hill during the Peninsula Campaign.
Criticized for his performance at Antietam, General Ripley returned to South Carolina in early 1863 and took charge of the First Military District.
His men constructed a series of improved defenses around Charleston, and Ripley commanded the troops that repelled a Union Navy attack on April 7, 1863.
He continued in command of Charleston's fortifications until the city was evacuated in mid-February 1865 and fought under Joseph E. Johnston at the Battle of Bentonville.
His uncle, James Wolfe Ripley, had led the Federal troops in Charleston Harbor during the Nullification Crisis, and was the Chief of Ordnance of the U.S. Army during the first half of the Civil War.