Asano Naganori and Lord Kamei were two daimyo, or Japanese lords, whose prospects were looking up. They were about to play hosts to some officials of the shogun, the big-wig who ran Japan. These were powerful men who had a constant presence with what was essentially Japan's chief badass. All they had to do was learn court etiquette from a well-versed teacher, Kira Kozuke-no-Suke Yoshinaka, inside the shogun's home, and they were set for life. There was only one problem.
Kira was an asshole. The sources vary on whether he straight up insulted them or merely didn't fulfill his duties as a teacher, but one thing was for certain: He was shitting all over the pair. While Asano was able to maintain his composure, Kamei planned to kill Kira. Luckily for Kamei, his servants knew that he was an unstable bastard and bribed the hell out of Kira. The teacher started actually treating Kamei with some measure of human dignity, and the debacle settled down.
At least on Kamei's side. Kira, noting that Asano hadn't left any unmarked bills in specified locations, ramped his asshattery up to eleven. It got to the point that Kira called Asano a "country boar," the medieval Japanese equivalent of "jive-ass motherfucker." Asano reacted like any rationale human being would at this point.
He drew a knife on Kira. The teacher's back was turned, but Asano wasn't about to let that keep him from fucking up the assassination. The first cut went across Kira's face. The second ended up missing entirely and plunging into an innocent wooden pillar. Lee Harvey Oswald this man was not, and he was soon restrained by guards. The shogun was left with a problem in his hands. Kira was a total knob, but Asano had drawn a weapon in the shogun's household. Like most typical Japanese mistakes, there was only one way to deal with the situation.
Lord Minamoto: Where is the coffee?
Squire Asano: I forgot to make it, my lord!
Lord Minamoto: Dammit, Asano! You have failed me for the last time!
It was a strange and magical era.
Asano committed seppuku, or ritual suicide, spilling his entrails before being beheaded. The name of his house was tarnished, his land was divided up among neighboring daimyo, and his retainers became ronin, or masterless samurai. The ronin, like any recently unemployed workforce, were pissed. Their daimyo was dead, their jobs gone, and they were cast to the streets. One amongst them, Oishi, rose as a leader in their ranks. Oishi was obviously the right choice, as he proceeded to concoct a convoluted and bloody plan for revenge.
The ronin spent the next two years acting like they had moved on. Some became farmers, others blacksmiths. Oishi, for his part, got constantly wasted and banged hookers. All to lower Kira's guard, of course. Kira bought into Oishi's whoreishness and slowly grew content with the knowledge he gotten away scott-free. It was exactly what Oishi wanted. Some of his comrades, those who weren't busy doing blow or visiting donkey shows, had since taken up construction, and they had learned the layout of Kira's castle.
All the pieces had come together. Oishi only had to take one more step before he besieged Kira's castle. Oishi met with his wife of twenty years, an extraordinary woman who had stuck with him in the good and the bad, and turned a blind eye to his fallen behavior. He had kept his plan secret from even her, so worried was he for the success of his mission. It was time that Oishi repaid her for the years of devotion in the only way he could.
He divorced her. You see, Oishi operated by the ancient bushido code of "bros before hos." Energized by the sustenance of a woman's tears, Oishi led his men to storm Kira's castle in the dead of night. It was a thorough assault. One half attacked the front gates while the other crashed into the back. They even sent messengers to tell the neighbors that it was only Kira they were attacking, and not them. The neighbors, relieved that Kira's tyrannical hold of their homeowner's association was at an end, held a block party to celebrate. In the words of one premient historian, it was, "pretty ball'n."
Enemy after enemy was cut down before the fury of the ronin before the castle was silent. Well, silent aside from the weeping and wails of terrified women and children. Aside from them, the castle was pretty damned quiet. The ronin had triumphed over their enemy, and brought honor to their fallen lord.
Except for the fact they couldn't fucking find Kira. They looked in closets, behind screens, and even posted Craigslist ads ("47mlfm"). It was all for naught. Dawn was coming and their revenge was uncompleted. That is, until they saw a wall scroll fluttering in a windowless room.
Apparently Kira had planned for just such a homocidal contingency, and had a secret courtyard built. The ronin pushed past the scroll, kicked open the door to a shack in it, and found the elderly Kira trembling. Being Japanese, and thus overwhelmingly polite, Oishi fell to his knees before Kira and asked him to face death like a samurai. He offered Kira the dagger Asano had used to commit seppuku. Of course, Kira was speechless. He had been woken in the dead of night, watched most of his retainers die, and felt his pants get ten pounds heavier. Oishi realized further entreaties were useless. With only one option left to him, Oishi bravely acted.
And proceeded to saw Kira's goddamned head off with the dagger.
The ronin left their enemy's castle victorious. As they moved across the countryside and back to their master's grave, they were invited by several households to feast. People were touched by their devotion to their master, their embodiment of the samurai spirit, and they fact they had taken out a notorious fuck. Oishi deposited Kira's head at their master's grave. They then awaited their fates.
The shogun was left in a bad spot, once again. These men evidently carried bushido in their hearts, but they had killed a court official, one of his most trusted men. He was trapped between admiration and law. It took time, deliberation, and the advice of able counselors before the shogun was able to come to a conclusion that was both just and fair.