The Nagano School Massacre was the event that inaugurated the Deadman Wonderland story.
It takes place in Nagano Middle School. It commences with a regular day, with the students talking and taking their seats. But then, the Red Man appears outside the window while a song is playing. Ganta Igarashi is the only one who notices said song playing. The Red Man uses his Branch of Sin and smashes through the wall of the classroom. He enters and massacres 21 students inside save for Ganta. Ganta, who fainted during the massacre, wakes up and sees the Red Man approaching him. The Red Man shoves a red diamond in Ganta's chest causing him to faint.
Ambulances arrive and the victims are later given a burial. Ganta was put in a hospital and soon after that arrested and put charges for murder. Tsunenaga Tamaki was appointed as his lawyer. Ganta couldn't prove his innocence and, taking account "numerous pieces of evidence", he was sentenced to death.
In the anime, this was slightly altered. Bundō Rokuro created a short movie as ordered from Tamaki, supposedly shot from a hidden camera in his office. This shows how Tamaki spoke to Ganta and Ganta supposedly "confessing" to all his crimes. The court acknowledged this as evidence and sentenced Ganta to death at Deadman Wonderland. Also, what didn't happen in the manga, is that Mimi's father burst out in rage and attacked Ganta. He blamed him for his daughter's death and punched him. The guards removed him and Ganta was left alone, in despair.
Ganta is hereby sent to Deadman Wonderland. It was only later revealed that Tamaki was actually the Warden of Deadman Wonderland and that the Red Man deliberately framed Ganta for murder so that he could be taken to Deadman Wonderland.
After the closure of Deadman Wonderland, every Deadman's case was opened again and most of them were declared innocent. So was Ganta, due to fabrication of evidence and justification of his crimes in prison. Ganta was sent to an orphanage after that.