Theodore Roosevelt became the US president after former president William McKinley died from gunshot wounds.

Source