
McKinley himself was the last president to have served in the Civil War, the only one to have entered the war as an 18 year old enlisted man, beginning as a private in the Union Army and ending as a brevet major. (According to some of his biographers, he preferred being called "Major McKinley" to "President McKinley".) He was born in Niles, Ohio and after the war, McKinley settled in Canton, Ohio, where he practiced law and married the love of his life, Ida Saxton. A wealthy mine owner named Mark Hanna saw promise in McKinley, even though McKinley defended several miners who were defendants in a famous criminal case. In 1876, with Hanna's backing, McKinley was elected to Congress, where he became the Republican Party's expert on the protective tariff. McKinley believed that the tariff would bring prosperity back to the nation. His 1890 McKinley Tariff was highly controversial, and Democrats tried to end his career as a Congressman by redistricting aimed at gerrymandering him out of office. They were successful and McKinley was defeated in the Democratic landslide of 1890. This did not end his political career (obviously) and he was elected governor of Ohio in 1891 and 1893, as moderate who found support both among capital and labor interests. With the aid of his close adviser Hanna, he secured the Republican nomination for president in 1896 amid a deep economic depression (the Panic of 1893). McKinley defeated his Democratic rival William Jennings Bryan, in part with a better financed successful pamphlet campaign, and by a front porch campaign in which he advocated "sound money" (the gold standard unless altered by international agreement). This was in stark contrast to his opponent who raced across the country by train speaking in many different locations. In the end voters liked McKinley's message better. He promised that high tariffs would restore prosperity.
His first term was net with rapid economic growth. McKinley promoted the 1897 Dingley Tariff to protect US manufacturers and factory workers from foreign competition. It seemed to be the right policy for its time. In 1900 secured the passage of the Gold Standard Act. McKinley hoped to persuade Spain to grant independence to rebellious Cuba without conflict. When negotiation failed, he reluctantly led the nation into the Spanish–American War of 1898. The United States victory was quick and decisive. The peace settlement that followed changed the nation, with territorial gains off the mainland. Spain turned over to the United States its main overseas colonies of Puerto Rico, Guam and the Philippines while Cuba was promised independence. However Cuba remained under the control of the United States Army. The United States annexed the independent Republic of Hawaii in 1898 and it became a United States territory.
McKinley defeated Bryan again in a rematch in the 1900 presidential election in a campaign that was focused on imperialism, protectionism and free silver. But McKinley would not be given the opportunity to continue his vision for the nation. His life was suddenly cut short when he was shot on September 6, 1901 by Leon Czolgosz, a Polish-American anarchist. McKinley died eight days later. He was succeeded by his Vice President, the energetic Theodore Roosevelt.
McKinley's death was mourned by a grieving nation. Soon however his presidency is was overshadowed by the larger-than-life personality of his successor, Theodore Roosevelt. The new president did not share the same enthusiasm as McKinley for the trade reciprocity that McKinley had hoped to negotiate with other nations. Memories of McKinley soon faded and by 1920, according to historian Lewis Gould, McKinley's administration was soon forgotten, and seen as "a mediocre prelude to the vigor and energy of Theodore Roosevelt's". In surveys ranking American presidents that soon followed, McKinley placed near the middle. This has continued in recent times, as a 2018 poll of the American Political Science Association’s Presidents and Executive Politics section ranked McKinley as the 22nd best president, while a 2017 C-Span poll of historians put McKinley in 16th place. A factor in his reduced popularity may be the perception of him as a pro-business, industrial, and modernization President. Others resent his expansionist leanings and he is often given the unflattering label of being an imperialist.
In political science terms, a realignment is defined as a set of sharp changes in party ideology, issues, party leaders, regional and demographic bases of power of political parties, and the structure or rules of the political system. The changes result in a new political power structure that lasts for decades, replacing an older dominant coalition. Many historians believe however that McKinley reshaped the presidency. In a recent biography, Republican political strategist Karl Rove sees McKinley as the catalyst for sweeping political realignment that carried into the current century.
But a controversial aspect of McKinley's presidency is the territorial expansion and allegations that he contributed to an attitude of imperialism. The U.S. would later grant Cuba and the Philippines independence, while Puerto Rico and Guam remain as territories. Hawaii has become a state. The territorial expansion of 1898 has not been repeated since. McKinley's biographer Morgan sees this as part of the rise of America as a world power and as part of the logical evolution of the nation rather than grandiosity on McKinley's part. He sees McKinley's actions in American expansion as intended to change the lives of Filipinos and Cubans for the better.
When McKinley died, in the words of Lewis Gould, "The nation experienced a wave of genuine grief at the news of McKinley's passing." The stock market suffered a steep decline. McKinley's casket made its way by train, first to Washington, where it first lay in the East Room of the Executive Mansion, and then in state in the Capitol, and then was taken to Canton. A hundred thousand people passed by the open casket in the Capitol Rotunda, many having waited hours in the rain. In Canton, an similar number of people did likewise at the Stark County Courthouse on September 18. The following day, a funeral service was held at the First Methodist Church. The casket was then sealed and taken to the receiving vault at West Lawn Cemetery in Canton, to await the construction of the memorial to McKinley already being planned. While many expected that the frail Ida McKinley would not survive her husband for very long, she remained in Canton for the remainder of her life, until her death at age 59 on May 26, 1907. She died months before the completion of the large marble monument to her husband in Canton, which was dedicated by President Roosevelt on September 30, 1907.
In addition to the Canton site there are many memorials to McKinley. The William McKinley Monument is located in front of the Ohio Statehouse in Columbus, Ohio and there is also a monument at his birthplace in Niles. Twenty Ohio schools bear his name and there are many other schools in the United States named McKinley School. Nearly a million dollars was pledged by contributors or allocated from public funds for the construction of McKinley memorials in the year after his death. Statues to him can be found in more than a dozen states. In 1896, a gold prospector gave McKinley's name to Denali, the tallest mountain in North America at 20,310 feet. The Alaska Board of Geographic Names changed the name of the mountain back to Denali in 1975, which is what it was called by locals. The Department of the Interior followed suit in August 2015 as a part of a visit to Alaska by President Barack Obama. Similarly, Denali National Park was known as Mount McKinley National Park until December 2, 1980, when it was changed by legislation signed by President Jimmy Carter.

McKinley continues to be revered more by historians than in public memory. Wayne Morgan summarized his legacy as follows:
"McKinley was a major actor in some of the most important events in American history. His decisions shaped future policies and public attitudes. He usually rises in the estimation of scholars who study his life in detail. Even those who disagree with his policies and decisions see him as an active, responsible, informed participant in charge of decision making. His dignified demeanor and subtle operations keep him somewhat remote from public perception."