William McKinley was the 25th president of the United States, serving from 1897 to 1901. He led the nation in the Spanish-American War and was assassinated in 1901. Theodore Roosevelt succeeded him.