Theodore Roosevelt became the US president after former president William McKinley died from gunshot wounds.
Source
More: The presidency of Theodore Roosevelt, Theodore Roosevelt, William McKinley