McKinley was born in Niles, Ohio, on January 29, 1843. He was the seventh of nine children and he served with distinction in the Civil War where his commanding officer was another future President, Rutherford Hayes, who later was a political mentor of McKinley's. After the war he became a lawyer and he married Ida Saxton. The couple had two daughters who died in infancy. Following the death of the children, Mrs. McKinley's health became poor and for her husband showed great devotion in caring for her.
By the late 1870s, McKinley had become a national Republican leader. He served in Congress as Representative of Ohio, and later he was elected Governor of Ohio. The main issue on which he focused was high tariffs on imports as a formula for prosperity and his signature legislation was the McKinley Tariff of 1890.
As President, McKinley presided over a return to prosperity after the Panic of 1893. The gold standard was his economic centerpiece, which many credited the nation's economic recovery on, rightly or wrongly. When the Spanish-American War began in 1898, although McKinley was hesitant to go to war, once the war began the U.S. victory was quick and decisive. The weak Spanish fleets were sunk and both Cuba and the Philippines were captured within a few months. As a result of the 1898 Treaty of Paris, the former Spanish colonies of Puerto Rico, Guam, and the Philippines were annexed by the United States as unincorporated territories, and U.S occupation of Cuba began. McKinley also annexed the independent Republic of Hawaii in 1898, with all its citizens becoming full American citizens. McKinley was reelected in the 1900 presidential election following another intense campaign against Bryan, which focused on foreign policy and the return of prosperity.
On September 6, 1901 McKinley was shot twice by anarchist Leon Czolgosz. One bullet was easily found and extracted, but doctors were unable to locate the second bullet. His doctors were afraid that the search for the bullet might cause more harm than good and McKinley appeared to be recovering. His doctors decided to leave the bullet where it was, which wasn't uncommon in those days. McKinley's doctors believed he would recover, and he convalesced for more than a week in Buffalo at the home of the exposition's director John Milburn.
On the morning of September 12, McKinley appeared to be doing much better. He felt strong enough to receive his first food orally since the shooting – toast and a small cup of coffee. But by the afternoon he began to experience discomfort and his condition rapidly worsened. McKinley began to go into shock. At 2:15 am on September 14, 1901, eight days after he was shot, McKinley died at age 58 from gangrene surrounding his wounds. His last words were reported as "It is God's way. His will be done, not ours."
On September 12, Vice-President Theodore Roosevelt met his family at their cabin near Mount Marcy, located in the high-peaks region of the Adirondacks, approximately 375 miles from Buffalo. The next morning, a cold, foggy day, Roosevelt left for a climb to the top of the mountain, accompanied by friends and a park ranger. By noon on September 13, Roosevelt and his party stopped to rest at the 5,344 feet (1,629 m)-high summit on a large flat rock that offered a panoramic view of the mountains. They climbed back down five hundred feet to have lunch by a lake. At about 1:30, a park ranger arrived bearing a telegram. Roosevelt is quoted as saying "I instinctively knew he had bad news. I wanted to become President, but I did not want to become President that way." After returning to his cabin, Roosevelt received a second telegram, this time from Secretary of War Elihu Root, urging that he return to Buffalo immediately.
Just before midnight, Roosevelt left his family for a carriage ride down the mountain, and at 3:30 a.m. he boarded another wagon and continued the long, twisting ride at high speed in the dark. Two hours later, Roosevelt finally arrived at the train station in North Creek, New York, where, at 5:22 a.m. on September 14, he received a telegram from Secretary of State John Hay telling him of McKinley's death.
Roosevelt boarded the train. He went to the Milburn house to pay his respects. He met with Mrs. McKinley and most of the cabinet, but could not see McKinley's body as the autopsy was underway. Secretary of War Elihu Root recommended holding the inauguration ceremony there, but Roosevelt thought that "inappropriate" and decided to return to the home of his friend Ansley Wilcox for the swearing-in ceremony. Roosevelt took the oath of office as the 26th President of the United States at 3:30 p.m., just six weeks before his 43rd birthday. He remains the youngest man ever to hold the office of President.
McKinley was originally buried in the receiving vault of West Lawn Cemetery in Canton, Ohio. His remains were later reinterred in the McKinley Memorial, also in Canton.