Itachi Uchiha killed his clan to prevent a coup d'état that the Uchiha clan was planning against the leadership of their village, Konohagakure (Hidden Leaf Village). The Uchiha felt marginalized and suspected by the village elders, which led to rising tensions and plans for rebellion. Itachi was given a difficult choice by the village leaders: kill his clan to stop the coup and prevent an all-out war, or let the conflict escalate, risking many lives, including possibly his younger brother Sasuke's. Itachi chose to massacre his clan, sparing only Sasuke, in order to protect the village and his brother. He was manipulated by Danzo Shimura, a powerful village elder, to carry out this act under the guise of protecting peace. Itachi's actions, though brutal and heartbreaking, were driven by his loyalty to the village and a desire to avoid larger bloodshed and war.