Itachi Uchiha killed his clan primarily to prevent a coup d'état that the Uchiha clan was planning against the Hidden Leaf Village (Konoha). The clan felt marginalized and distrusted by the village leadership, and tensions were rising to the point of potential civil war. Itachi, who was loyal to Konoha, was manipulated by Danzo Shimura, a high-ranking figure in the village, into choosing between allowing the rebellion or eliminating his own clan to maintain peace. He chose the latter to protect the village and especially to spare his younger brother Sasuke's life. Despite the massacre, Itachi carried a heavy burden of guilt and acted with the hope that Sasuke would eventually understand his sacrifice and grow strong. Itachi's actions were driven by his loyalty to the village and love for his brother, making him a tragic hero rather than a simple villain.