William Ruffin Cox (March 11, 1832 – December 26, 1919) was an American soldier and politician from the state of North Carolina. He was a brigadier general in the Confederate Army during the American Civil War, a three-term member of the United States House of Representatives from 1881 to 1887, and Secretary of the United States Senate from 1893 to 1900.