During the Civil War William McKinley served under Colonel Rutherford B Hayes, who was later to become president, and he was a a major in the 23rd Ohio Volunteer Infantry. Hayes made McKinley his aide-de-camp and subsequently encouraged his political career. McKinley was elected to the United States Congress in 1877 and served for fourteen years to 1891. He continued to build his political base as governor of Ohio, from 1892 to 1896, in addition to serving the Republican Party nationally.
McKinley was elected president in the election of 1896 and served from 1897 to 1901. The greatest event in his presidency was the intervention of the United States to secure Cuba's independence from Spain. He was returned to office for a second term but he was shot by an assassin at Buffalo on 6 September 1901 and died on 14 September.
President McKinley ewas a member of the Scotch-Irish Society of America and in 1893 he welcomed the 5th Scotch-Irish Congress to Springfield, Ohio. Also that year he attended the Columbian World's Fair in Chicago and told the members of the McKinlay clan, 'Your ancestors of the McKinlay clan came to this country directly from Scotland, while mine came from the North of Ireland, but we are probably of the same original covenanter stock.' In 1897 F A Claypool published a book entitled The Scotch Ancestors of William McKinley.