Born in Butler County, Ohio, Irwin graduated in 1848 from Marietta College in Marietta, where he would later become an instructor. After moving to California, Irwin worked in various private industries and was eventually elected to the California State Assembly as one of two members representing Siskiyou County. He became the editor of a newspaper and then was elected to the California State Senate. He served as president pro tempore of the Senate and as such, became acting lieutenant governor in 1875 when Lieutenant Governor Romualdo Pacheco became governor. Irwin was elected governor in his own right that same year. He died in 1886 in San Francisco, California.