She has a minor role in Fate/Zero, she first appeared in the beginning when she was born. Because the head of the family anticipated the possibility that Kiritsugu and Irisviel would fail to win the Fourth Heaven's Feel, he allowed Illyasviel to be born with modifications to allow her to become the Holy Grail should a Fifth Holy Grail War occur. In the Drama CD, she was born out of love between Kiritsugu Emiya and Irisviel von Einzbern. She will be Kiritsugu's reason for living when he comes back from the war.
As she grows up, she was very fond of her father which surprises Saber as Saber thought Kiritsugu was a cold person. Kiritsugu while carrying her realizes that she stopped growing. Before he leaves for the war, Kiritsugu promises to return to Illya, who promises to wait until he returns.
Illya does not remain far from Kiritsugu and Irisviel's thoughts during the war. During a brief moment of respite, Kiritsugu expresses his despair to his wife and his desire to take their daughter and flee. However, Irisviel assures him that he must continue. During the final days of the war, Irisviel's consciousness is consumed by the Grail, Irisviel asks Kiritsugu to bring Illya to Japan and to make their daughter happy. However, as Irisviel becomes the Grail, she sees a vision of Illya fearing her own fate of becoming the Grail one day. Kiritsugu's own vision in the Grail eventually shows him destroying everyone he wants to save, including all his loved ones, until he is finally forced to kill Illya.
Though Kiritsugu survives the Fourth Grail War, his decision to destroy the Grail rather than realize the Third Magic is regarded as a betrayal by the Einzbern. He makes multiple attempts to retrieve Illya, but he is prevented from succeeding by Jubstacheit refusing to open the bounded barrier around the Einzbern castle. With his deteriorating body, he could not find the entrance of the bounded field and he died regretting the thought of not being able to save her. Illya never knew that her father had repeatedly tried to save her and she was groomed to despise Kiritsugu for his betrayal after Kiritsugu left her, Illya went through a cruel training by the Einzberns so she could be able to control Berserker and be their representative in the Grail War.
In the Fate route, Illya initially appears as an enemy to Shirou Emiya. Unbeknowst to Shirou, his foster-father had been the Master for the previous War, representing the Einzbern family. Kiritsugu's decision to destroy the Holy Grail had been regarded as a betrayal and is the apparent reason for why Illya has decided to specifically target Shirou. After Saber is weakened after her fight against Rider, Shirou is captured by Ilya, who gives him the proposition to become her servant, which he refuses. Frustrated with his response, she orders Berserker to attack Rin, Saber and Archer, who had come to save Shirou.
Archer sacrifices himself in order to allow Rin, Saber, and Shirou to escape, by staying behind to fight Berserker despite knowing he is outmatched. He manages to take five of Berserker's twelve lives before he is ultimately defeated. In order to replenish Saber's mana, Shirou gives a part of his magical circuit to Saber and they go fight against Illya and Berserker. Berserker is defeated by Saber and Shirou after the latter traces Caliburn, Saber's original sword. Without the protection of her Servant, Illya joins Shirou's household. She lives peacefully with Shirou and winds up being by Taiga. Notably, she is somewhat attached to Shirou, and believing Taiga to be an annoyance, she is often at odds with her. However, according to Archer, she has less than a year to live due to being an Einzbern homunculi.
Unlimited Blade Works
In the Unlimited Blade Works route, she has a lesser role. She introduces herself as a Master to Shirou and Rin, but since the most dangerous servant in the route is Caster, she doesn't attack them. In order to defeat Caster, Shirou and Rin decide to form an alliance with Illya. However, they arrive too late at her castle and Illya is defeated and killed by Gilgamesh after the latter rips her heart out of her body.
During Heaven's Feel, Illya does the same thing that she did in Fate: upon realizing that Kiritsugu is dead, she decides to take revenge on Shirou. She attacks Rin and Shirou by surprise and Shirou gets injured after protecting Saber. When they meet again in the park, she forms a friendly relationship with Shirou and they chat frequently in the park. She tells him about her past and about the Dress of Heaven. She also appears to be aware of the relationship between Shirou and Archer.
Illya is later attacked by Zouken Matou after Berserker is defeated by Saber Alter and corrupted into becoming one of Sakura Matou's Servants. Once Berserker is destroyed, Illya reveals the truth regarding Heaven's Feel, the Holy Grail, and Angra Mainyu, the corruption in the Grail. Together with Rin, they work together to replicate the Jeweled Sword of Zelretch, which Rin intends to wield against Sakura, who has become a second vessel for the corrupted contents of the Grail. Illya remains behind while Shirou and Rin confront Sakura, extracting a promise that they will return alive.
During Shirou's battle with Saber Alter, Illya locates the Dress of Heaven, a conceptual garment used by Illya's ancestor, Justeaze von Einzbern, during the First Heaven's Feel. Realizing that even if Shirou manages to defeat and retrieve Sakura it would be insufficient to save everyone from the Grail's destructive power, Illya intends to utilize the Dress of Heaven to protect Shirou.
If the affection score for her is high enough, it results in Sakura's True Ending (if the affection score is low, she regretfully kills Shirou resulting in a Bad End). Ilya appears using the Dress of Heaven, appearing just in time when Shirou is about to sacrifice himself to save Sakura. She stops him and materializes her soul using an incomplete form of the Third Magic. Illya reveals to Shirou that she is his older sister and tells him that because of it, her duty is to protect him. She eventually gives her body up to become the Grail and performs Heaven's Feel on Shirou to keep him alive.