During the Mexican–American War he led the Mormon Battalion from Santa Fe to California, establishing what became known as Cooke's Wagon Road, later to become the southern route to California during the California Gold Rush. He received a brevet promotion to lieutenant colonel for his service in California. In command of 2nd U.S. Dragoons, he defeated the Jicarilla Apache in Ojo Caliente, New Mexico in 1854, was in the 1855 Battle of Ash Hollow against the Sioux, and was sent to keep the peace in Bleeding Kansas in 1856–1857. Acquainted with Brigham Young, Cooke took part in the Utah expedition of 1857–58, after which he was promoted to colonel and assigned command of the 2nd U.S. Dragoons. He was an observer for the U.S. Army in the Crimean War and commanded the Department of Utah from 1860 until 1861.