Shinji is the latest in line in the Matou magus family. He is the older brother of Sakura. Shinji treats Sakura very poorly and abuses her on a daily basis.
Shinji does quite well academically and is very popular as the Vice-Captain of the school's archery club. He is also a good friend of Shirou and has a crush on Rin.
The Matou magus family was losing its magic powers in its recent years. Shinji himself was completely incapable of magic. Despite this fact, Shinji still believes that he is the rightful heir and successor of the Matou family.
Zouken did not want the family to die out so he adopted Sakura from the Tohsaka family. Shinji initially rejected her as an outsider but eventually grew to like her. Some time later, Shinji discovered that Zouken had been training Sakura exclusively. Shinji became jealous and hated Sakura for stealing his right to succeed the Matou family and started abusing her.
Shinji became friends with Shirou at school though he disapproved of Sakura visiting Shirou's home. When the fifth Holy Grail War started, Sakura managed to summon Rider. She did not want to fight, so Shinji convinced Zouken to allow him to fight in her stead in order to prove himself as the rightful successor of the family.
Shinji had Sakura create a book for him which acts as his Command Spell to control Rider. Shinji could not provide Rider with magical energy, so he had her set up her boundary field at school in order to drain the students' life energy to fuel Rider.
Shinji realized that Rin is also a Master in the war and later discovered that Shirou was a Master as well. Shinji offered Shirou an allegiance explaining that he doesn't want to take an active role in the war. He also revealed that there is a Master at Ryudou Temple. When Saber assaulted Ryudou Temple, Shinji sent Rider to spy on their duel.
Later, Shinji realized that Shirou had allied with Rin so he wanted to defeat him. Shinji invited Shirou to school and had Rider activate her boundary field. Shirou tried to talk Shinji out of it but he sent Rider to attack him. Shirou then summoned Saber to attack Shinji and Rider. Shinji ordered Rider to dispel her field to help him escape.
The next day, Shirou and Saber found Rider in town. Saber defeated Rider and Shinji ran away in panic. He ran into Illyasviel and she ordered Berserker to kill him.
Unlimited Blade Works
Shinji had Rider activate her boundary field at school. Rider was killed soon after and Shinji cursed her weakness.
Shinji then ran to the church to seek refuge from the war and Kotomine recognized his will to continue fighting. He paired Shinji up with Gilgamesh. Gilgamesh discovered that Shinji did not know what the Holy Grail was but convinced him to search for it anyway. Shinji and Gilgamesh assaulted Einzbern castle, killing Berserker and ripping Illyasviel's heart out. Gilgamesh then planted her heart into Shinji, turning him into a Holy Grail.
He then brought Shinji to Ryudou Temple to open the gate of the Holy Grail and Shinji morphed into an enormous amorphous mass of flesh. Rin crossed the lake of poison and rescued Shinji with the help of Archer.
Shinji had Rider attack a woman in town to lure Shirou and Saber to a duel. Saber defeated Rider easily and Shinji lost his book. Zouken voiced his discontent for Shinji, cursing his ineptitude.
Later, Shinji kidnapped Sakura and had her make another book for him. He held Sakura hostage at school and demanded that Shirou fight against Rider. Rin and Archer showed up and Archer defeated Rider. Shinji cursed her weakness. Sakura was upset with Shinji's abuse of Rider and revoked his control over her. Shinji then caused Sakura to go wild, which activated Rider's boundary field. He then left the school.
Much later, Sakura returned to the Matou house to confront Zouken but she ran into Shinji instead. He took out his frustration on her, causing her to snap and kill him.