People die when they are killed.
— Shirou Emiya
When it's your birthday, you celebrate being born.
— Shirou Emiya
Just because you're correct doesn't mean you're right!
— Shirou Emiya

Shirou lived a relatively normal, happy life for his first five years. All that changed abruptly when Kiristugu Emiya won the Fourth Grail War and rejected the grail, causing a massive fire that wiped out his residential area. He wandered through the devastation for hours upon end, watching people die senseless deaths. Kiritsugu himself eventually rescued him, and implanted Avalon inside him to prevent him from dying. Kiritsugu would later adopt Shirou, raising him as his son and teaching him magecraft. Five years later, Kiritsugu would pass away, leaving his dream of being a hero to Shirou.

Shirou had developed a more twisted personality than Kiritsugu, and tried to protect and help everyone. After about five more years practicing magecraft and fixing heaters, the Fifth Grail War starts. At the outset, he gets attacked by Lancer and dies. Rin comes across him as he's dying and uses magic to heal him, making him basically a zombie. He summons Saber, and enters the war. During the course of the Unlimited Blade Works route, he allies with Rin for the duration, which eventually develops into a romance. Over the course of the war and through his interaction with Archer, he learns Projection and matures.

After defeating most of the other Servants, Archer and Shirou fight. Shirou wins, as his determination to uphold his ideals firmly puts him on a different path than his future self. He and Rin then form a contract so that he can use his reality marble at will, and they confront Gilgamesh, who is trying to summon a corrupted grail to kill off humanity. Shirou invokes Unlimited Blade Works and wins, while Rin rescues Shinji, who had been forcibly made into the core of the Grail. After they graduate, Shirou follows Rin to the Clock Tower and beyond, as her apprentice/manservant/sex slave.