BackgroundFollowing the Kyuubi's attack on Konoha, Konoha's leadership began to suspect that an Uchiha was behind the attack due to the Sharingan's ability to control Kurama. From that point onwards, the Uchiha were placed under close surveillance, something Obito claims was accomplished by forcing all Uchiha to live in a corner of the village. This mistrust and isolation from the rest of the village created feelings of ill-will amongst the Uchiha, and ultimately rekindled the hatred towards the Senju-influenced government. As such, the Uchiha, led by Uchiha Fugaku, began planning a coup d'état to overthrow the Konoha leadership.
In preparation for the coup, the Uchiha started inserting its member within Konoha's command structure to act as spies; Uchiha Itachi was placed in the Anbu, the direct arm of the Hokage, but Itachi did not agree with the Uchiha's plans, believing the coup would only escalate into another Shinobi War. As such, he turned double-agent, providing Konoha with information on the Uchiha's plans. Sarutobi Hiruzen, who had not agreed with the treatment of the Uchiha following Kurama's attack, tried to find a peaceful resolution with the clan. However Shimura Danzo, did not believe negotiations would solve anything and felt eliminating all the Uchiha would cause the least bloodshed.The Uchiha noticed Itachi's strange behavior and tasked Uchiha Shisui with keeping an eye on him. Shisui, a close friend of Itachi, shared his opposition to the coup. When peace talks started to break down, Shisui attempted to use his Kotoamatsukami technique to force the Uchiha's leaders to change their minds. Danzo felt this was a waste of Kotoamatsukami's rare usage and took Shisui's right eye for himself before Shisui had a chance to use it. Having fail his assignment and feared that Danzo would take his other eye too, Shisui entrusted his left eye to Itachi before committing suicide. After finding his body, the Uchiha believed Shisui had, in fact, been murdered by Itachi and the suicide was staged, and as such no longer trusted him.
Although he still wanted to find a non-violent solution, Shisui's death convinced Itachi that events could no longer be stopped. He became outwardly critical of the clan's actions and hostile towards individual members. Danzo, being aware of Itachi's conflicted feelings, explained the two possible outcomes: the Uchiha could be allowed to carry out their coup, an act that would ultimately lead to the entire clan's extermination, including Itachi and his younger brother, Uchiha Sasuke; or Itachi could assassinate the Uchiha before the coup took place, and in exchange would be allowed to spare Sasuke's life. Itachi chose to save his little brother.Before carrying out the massacre, Itachi found Obito sneaking around the village. Believing he was Uchiha Madara bent on destroying Konoha, Itachi offered to help him take revenge against the Uchiha for betraying him decades earlier but only if he would spare the village and Sasuke. Obito agreed, and also met with Danzo around the same time for unknown purposes.
The Tragic Night
In a single night, Itachi and Obito slaughtered the entire Uchiha clan. In the anime, Obito slaughtered the military portion of the Uchiha Clan by directly attacking the Konoha Military Police Force headquarters, enabling Itachi to slaughter the civilian portion without much resistance. In the anime, Obito secretly took some of the Uchiha's corpses for himself. Itachi expected Fugaku to be the greatest enemy and entered his home with great caution. To his complete surprise, both his parents were willing to accept death rather than fight their son. Both respected his decision to side with the village over the clan, and asked only that he look after Sasuke. He tearfully killed them just before Sasuke returned home from the Ninja Academy.Although he knew his actions were necessary, Itachi could not forgive himself for killing his own family and believed he had to be punished. Sasuke, who was a child at the time and thus ignorant of the Uchiha's conspiracies, was the only person qualified to pass the judgment on Itachi he felt he deserved. As such, Itachi attacked Sasuke when he entered their house, desperate to make Sasuke believe he had killed their clan without provocation and for selfish pursuits of power. He used Tsukuyomi to torment Sasuke with images of the clan's murder and claimed Sasuke was too weak to even bother killing. Itachi encouraged Sasuke to get stronger and to come after him to avenge their family.
As Itachi left, Sasuke made an immediate attempt to follow Itachi's instructions; by awakening his Sharingan for the first time. Sasuke pursued Itachi and attacked him, managing to knock off his forehead protector. Itachi wept from Sasuke's action, but continued on after collecting his forehead protector. Sasuke passed out from the traumas of the night and would not remember this moment of retaliation for many years.
Only three Uchiha survived the clan's massacre: Itachi, Sasuke, and Obito, though most of the world, Sasuke included, would not know of Obito's involvement or survival until the Fourth Shinobi War.Itachi reported the mission's success to the Third Hokage. The Third having been unaware of Itachi's assignment from Danzo, regretted to hear the news. With nothing to be done about it now, the Third promised to perpetuate the cover story that Itachi had acted alone and without cause so that nobody would learn of the Uchiha's plans, and also so that Konoha would not be tarnished for its involvement. Most importantly to Itachi, the Third vowed to keep Sasuke safe from Danzo. In the anime, the Third also order the dissolution of Danzo's Root as punishment for acting without his permission. Itachi then left the village, joining Obito's organisation, the Akatsuki, in order to reinforce his image as a criminal. In actuality, he monitored the Akatsuki from the inside, keeping Konoha informed of its actions and preventing the organisation from moving against the village.
True to Itachi's intentions, the Uchiha's massacre had an immense impact on Sasuke. Sasuke's sole motivation over the following years was to become strong enough to kill Itachi, first by training as a shinobi of Konoha and later, after being dissatisfied by his slow growth in Konoha, defects from the village to go to Orochimaru. Under Orochimaru, Sasuke gained enough power to finally pose a threat to Itachi, culminating in Itachi's death when they finally met in battle. Sasuke enjoyed a brief moment of believing he had avenged his family at last, but was shortly afterwards approached by Obito and informed of the truth behind Itachi's actions. After realizing that Itachi only ever acted in the interests of his village, Sasuke decided to destroy Konoha for what they did to his brother. However, after reconciling with a reincarnated Itachi, Sasuke decided that this would be contradictory to what Itachi sacrificed his life for and that he would instead protect the village.
The truth of the Uchiha clan's massacre was successfully kept a secret for many years, though Yakushi Kabuto an experienced information gatherer, was able to discover it at some point. After Itachi's death, Obito no longer felt obligated to keep up the cover story and shared the truth when he deemed it convenient. After he told the story to Sasuke, Obito told it to Uzumaki Naruto, Hatake Kakashi, and Yamato in order to defend Sasuke's actions. Upon his reincarnation and learning that the truth has been revealed, Itachi insists that those who know do not publicize it so that the Uchiha clan may retain some honor.
- In the manga, Obito stated Fugaku organised and planned the coup d'état. But in the anime, it was revealed he did not plan it, but as the representative of the whole Uchiha Clan, he had no choice but to go along with their decision. However, he opted for an option that would satisfy the Uchiha Clan and lead to the least bloodshed. To this end, he asked Itachi to help him take over the seat of Hokage by force.
all information on the Uchiha Clan Massacre is from http://naruto.wikia.com/wiki/Uchiha_Clan_Downfall