A young Shirou Emiya and his adoptive father Kiritsugu travel to Fuyuki city in order to investigate the Sakatsuki family, who are rumored to be harboring a child with powerful magic abilities. However, they arrive to find the city engulfed in a massive black vortex which is banished by a mysterious light. They enter the ruins of the city where they find and rescue Miyu, the child they are looking for. Kiritsugu explains that Miyu has the power to grant wishes unconditionally, and that the storm was most likely caused when she was inadvertently exposed to humans thoughts and desires. Kiritsugu declares that he will use her power to save humanity. Shirou and Kiritsugu take Miyu back to their home, where Kiritsugu makes it clear to Shirou that they should only consider her a tool and not a human. Regardless, Shirou begins to bond with Miyu and Kiritsugu passes away before he can learn how to use Miyu’s powers.
Five years later, Shirou is living as a regular high school student with Miyu as his adopted younger sister and attends school with his classmates Julian and Sakura. During this, Miyu’s powers have disappeared with age as Kiritsugu had originally feared. Shirou decides it is time to let Miyu experience the world outside their home, with Miyu saying she wants to see the ocean. Feeling guilt for his past actions, he takes her to the ruins of her original family’s home where he admits that he and Kiritsugu originally took her in to exploit her powers, not save her. Julian then arrives, telling Shirou that he had been looking for Miyu for the past five years in order to finish the ritual he had started. Shirou realizes that Julian was the cause of the vortex that consumed Fuyuki and attempts to protect Miyu, but is defeated by Julian and his follower Angelica who leave him for dead while Miyu is kidnapped.
Shirou then wakes up in the care of a local priest, Kirei Kotomine. He explains that Julian is part of the Ainsworth family, an ancient family of mages who foresaw the end of humanity and sought to obtain the wish granting Holy Grail to avert it. However, their four past attempts to obtain it in a ritual called the Holy Grail War ended in failure, with the Fourth Grail War resulting in the vortex that destroyed much of Fuyuki. However, this time, Julian plans to use Miyu as a sacrifice to start the Fifth Grail War. Kirei tells Shirou where Julian’s hideout is, but Shirou is unable to penetrate its magical defenses. Sakura then visits him and informs him that the Fifth Grail War has started, and the participants have been given special Servant Cards that can imbue them with the power of a Heroic Spirit. She offers one to Shirou to give him a way to rescue Miyu, but admits that she would rather see him leave the city and not get involved in the War due to her feelings for him. They are then attacked by her older brother Shinji, who holds the Assassin Card. Sakura is killed and Shirou uses her Archer Card to empower himself and kill Shinji, who is revealed to merely be a puppet sent by Julian.
With his Archer Card, Shirou begins hunting down the other Servant Card holders and killing them, who are all revealed to be Julian’s puppets as well. Julian observes Shirou’s progress along with Miyu, who now only sees herself as a tool to be used and does nothing to stop Julian’s plans. Kirei congratulates Shirou for winning the Fifth Grail War and directs him to an ancient cave where Miyu is being held. Shirou continues on and reunites with Miyu. He decides to use his wish to send Miyu to a different world where she can find happiness despite going against Kiritsugu’s wishes. As the wish takes effect, Shirou confronts Angelica, the holder of the real Archer Card. Having used his Card to make his wish, Shirou is forced to fight Angelica with his own abilities. While Shirou is overpowered and defeated, he manages to buy enough time for the ritual to complete and Miyu is transported away. Miyu then wakes up in an alternate Fuyuki, now with the objective of finding the cards.