Why Did Itachi Uchiha Kill His Clan In Naruto?
This post contains major spoilers for "Naruto" and "Naruto: Shippuden."
The shadow of the Uchiha massacre hangs over Konoha in "Naruto." This tragic incident is constantly brought up in the series in relation to Sasuke Uchiha, one of the last surviving members of the Uchiha clan. A part of Kakashi's Team 7 alongside Naruto and Sakura, Sasuke has been haunted by the incident since he was a child, which directly shaped his trajectory as a future defector seeking revenge. To add insult to injury, the massacre in question was carried out by his brother, Itachi, whose seemingly violent motivations (and constant instigations for Sasuke to get stronger) veered Sasuke off the well-treaded path of an honorable shinobi.
But honor has little place in a world brimming with convoluted machinations and deceptive intentions. Sasuke's defection is a complex subject, but so are Itachi's actions — to better understand the latter, we need to contextualize the incident in question. You see, Konoha was shaken up after the attack of the Nine-tailed fox, and some of the leaders started suspecting the Uchiha clan due to their ability to use the Sharingan (which could be used to control the beast). This brewing suspicion/mistrust led to the Uchihas being completely isolated, leading to the clan's decision to organize a coup d'état (and overthrow the existing leadership).
However, a coup cannot be carried out overnight, especially in a society where being a shinobi is the default. The Uchiha clan appointed several spies, including Itachi, to infiltrate Konoha's command structure for information. The plan was to identify structural weaknesses and remain up-to-date about any counter-moves. Sadly, the Uchiha were never able to anticipate the terrible string of events that would eventually lead to their demise.
Itachi was manipulated into making a horrific choice to protect Sasuke Uchiha
I must preface that Itachi was labeled as a prodigy, as he displayed exceptional talent that helped him quickly ascend the ranks of the Anbu Black Ops (an elite, morally grey shinobi faction). What's more, he was also a deeply affectionate person whom Sasuke looked up to as a child. To think someone like Itachi would ruthlessly slaughter his own clan (and his parents) and mock Sasuke throughout his life is unthinkable, so what exactly happened here?
While Itachi spied for his clan, he wasn't in agreement with the coup, as he wanted to prevent unnecessary bloodshed. Sensing this conflict, the Konoha leadership manipulated Itachi's well-meaning motivations and persuaded him to become a double agent. The Third Hokage was the only person who genuinely aimed for a peaceful resolution of conflict, but the others, specifically Danzō Shimura, strongly believed that eliminating the Uchiha was the lesser of two evils. Amid this chaos, Itachi's friend Shisui tried to use his Mangekyō Sharingan's Kotoamatsukami to change the minds of these leaders, but Danzō took one of his eyes (!) instead. Fearing misuse of his other eye, Shisui left it to Itachi for safekeeping before committing suicide. Unfortunately, the Uchiha erroneously concluded that Itachi had killed Shisui after betraying his own clan.
Shisui's death cemented Itachi's belief that a non-violent solution was impossible. Once again, Danzō took advantage of this and convinced Itachi that he had only two options: to allow the coup to happen, but it would lead to the clan's lawful extermination, or Itachi could assassinate everyone himself while sparing Sasuke's life. With threats of an inevitable civil war looming, Itachi decided to bear a terrible burden that would crush his sense of self forever.
Sasuke's moral complexity in Naruto is directly shaped by the Uchiha massacre
Sasuke was only 7 years old when the Uchiha massacre happened. He returned home to find his entire clan slaughtered, alongside his parents, with Itachi standing over their lifeless bodies. To make his brother think that he's a ruthless killer, Itachi attacked him, while egging him on to embrace vengeance. Broken and traumatized, Sasuke retaliated, trying to do exactly what his brother asked him to and attacked Itachi in an attempt to awaken his Sharingan. Despite being able to knock off Itachi's forehead protector, Sasuke passed out due to the trauma, and his mind erased this violent retaliation to protect him.
As intended by Itachi, the damage was done, as Sasuke spent every waking moment trying to get strong enough to kill Itachi and avenge his clan ever since. After Orochimaru's repeated interventions to corrupt him (along with some choice visits by Itachi to provoke him further), Sasuke defected from Konoha, choosing a dark path marked with pain and rage. The truth about that fateful night was lost to time, but Sasuke learned the truth a little too late in "Naruto: Shippuden", making him realize that Itachi's actions only stemmed from a need to protect him.
Instead of sobering him, the truth enraged him further, prompting Sasuke's desire to destroy Konoha, as he held the village responsible for what happened to his brother. Ultimately, a reincarnated Itachi stopped Sasuke, urging him to realize that he had already achieved the goal of becoming stronger and that attacking the village would be the opposite of what he had sacrificed everything for. This marked the inception of Sasuke's gradual reform, where he went on to protect Konoha alongside Naruto through every crisis.