In early 1845, William Workman was appointed captain of a cadre of Americans and Europeans serving with Governor Pío Pico in his standoff with appointed Governor Manuel Micheltorena at the battle at Cahuenga Pass of the Mexican–American War, northwest of Los Angeles. Although the battle that ensued was limited to minimal gunfire and no casualties, Workman, his lieutenant John Rowland, Benjamin Davis Wilson, and James McKinley from the Pico side worked out a surrender option with Americans and Europeans on the Micheltorena side and the governor was allowed to leave California by ship. Pico assumed the governorship, but his relocating of the Alta California capital to Los Angeles from Monterey and his plan to move the customs house to San Pedro Bay, among other issues, led northerner José Castro to mount a challenge to Pico's authority. Workman was appointed to lead the defense of Los Angeles against an incursion by Castro's forces, when news came that the American army was ready to invade the department of Alta California for other actions in the Mexican War. William Workman played an important role in subsequent events during the Mexican–American War. After a group of Americans, including Wilson and Rowland, were seized in late summer 1846 at the Rancho Santa Ana del Chino house of Isaac Williams, Workman and neighboring ranchero Ignacio Palomares worked to free the prisoners, who were held at Paredon Blanco (later Boyle Heights.) After the native Californios, in the Siege of Los Angeles, were successful in expelling the American force left to guard the town after the initial conquest by U.S. forces and another American invasion was being led by Commodore Robert F. Stockton, Workman met Stockton at Mission San Juan Capistrano just after New Year's Day 1847 and arranged an amnesty for all Californios who would resist the American retaking of Los Angeles. When the last battle of the war on California soil was fought in the San Fernando Valley in Cahuenga Pass on 9 January 1845, Workman and two others brought out the flag of truce the following morning at Campo de Cahuenga. Notably, Pío Pico had been ordered by the legislature of Alta California to go to Mexico and request assistance. When Pico returned to Los Angeles in 1848, he spent some time at Workman's residence. When the ex-governor refused to present himself to the military commander at Los Angeles, Jonathan D. Stevenson, Stevenson raged that Workman was complicit in this defiance, angrily stating that Workman was "ever hostile to the American cause."