Timon and Pumbaa are enjoying their summer while eating their June Bugs. The two friends then get arrested for eating June Bugs in July. The police officer explains that it was illegal since a bird said so, making Timon and Pumbaa find Little Jimmy in their cell. Pumbaa, at first, finds this to be a coincidence, which Timon replies that they have been framed, reminding his friend about the last time they saw Little Jimmy.
While Timon fears about what Little Jimmy is going to do to them, Pumbaa points out that he can’t do anything painful to them since he’s only a bird in the cage, making them prepare to get tough on the bluebird. Little Jimmy then reveals to the duo that he is cell mates with Smolder the Bear. The bluebird convinces Smolder that Timon and Pumbaa were about to hurt him, which the bear states that if they do so, he will hurt them back, making Timon and Pumbaa try to figure out a way to get out of jail.
Timon and Pumbaa are now doing aerobics, with Pumbaa stating that life in prison isn’t so bad until they have to work a rock pile with Smolder and Little Jimmy. When Little Jimmy makes Timon hold his ax for him, he convinces Smolder that Timon and Pumbaa hurt him with the ax. As Smolder is getting ready to hurt the two friends, Timon and Pumbaa flee.
On their first attempt to escape, Timon bakes a cake with a pile in it to cut through the bars, ties some sheets together to climb over the wall, and leave jail with a getaway laundry cart. But Timon and Pumbaa run into Smolder and Little Jimmy, who are looking for the duo. When the pals hide in the cart before they see them, Smolder eats the cake. He tells Little Jimmy that Timon and Pumbaa are probably hiding somewhere, but he’ll eventually find them.
Pumbaa comes up with a better idea to escape, which is to get a law degree, file a paperwork, and then email it to the law for them to pardon the duo. Smolder and Little Jimmy enter the room Timon and Pumbaa are in. While the duo is hiding in a book, Smolder reminds Little Jimmy about the painful thing he will do to them. As they leave the room, Little Jimmy reveals that he is taking advantage of Smolder in order to get revenge on Timon and Pumbaa for turning him in.
When Timon and Pumbaa attempt to make a quick escape, they run into Smolder and Little Jimmy. They flee from them back into their cell, but get cornered by them. As Smolder prepares to hurt the duo, Pumbaa attempts to use his gas power to make them leave him and Timon alone, but it doesn’t work.
Luckily, the prison guard shows up to let the prisoners know that he got a pardon, which is revealed to be for Smolder and Little Jimmy instead of Timon and Pumbaa. As Smolder and Little Jimmy get out of their cell, Little Jimmy reveals to the bear that he has been taking advantage of him. This makes Smolder angry and the two start fighting while Timon and Pumbaa realize that they are now fine in their cell without their enemies. However, Smolder and Little Jimmy are sent back into their cell for fighting. When they agree that it is Timon and Pumbaa’s fault, the two friends escape by running into the wall, making Timon question why they haven’t thought of that before.
This episode contains flashbacks to the episode "Nest Best Thing."
The title is a pun to 1957 Elvis Presley's song "Jailhouse Rock"