"Chief of Hearts" is the eighteenth episode of Season 21.
Homer and Chief Wiggum become close friends during Homer's community service stint, but when Homer leaves Wiggum's side during his recuperation to go to Moe's, the Chief takes offense; Bart becomes addicted to Battle Ball (a Japanese game with cards and plastic balls that turn into creatures). Marge believes that Bart is on drugs, because she overhears him saying that they are "addictive and imported."
Homer is walking to the bank while eating a candy apple. When he arrives at the bank, he notices the "No food or drinks" sign outside and attempts to sneak the candy apple inside the bank, but is mistaken for a bank robber in the process.
Homer is then sentenced to community service, and is forced to clean up trash in a local neighborhood. While on community service, he offers Chief Wiggum a sandwich. Wiggum accepts the offer, and the two quickly become friends.
Meanwhile, Bart attends a friend's birthday party and gets hooked on the Japanese card game Battle Ball, involving magnetic balls and cards. While he and Milhouse play in the basement, Marge is suspicious and thinks he is on drugs. When she discovers his game, she enjoys it, which drives Bart to get rid of it all by flushing it down the toilet.
Homer and Chief Wiggum bond together by driving through town, and go to a cliff (Wiggum's favorite place in the world) and talk until Wiggum gets a call from Lou to come bust Fat Tony and his gang. When the two get there, Wiggum lets Homer cuff them, but then one of the criminals holds Wiggum at gunpoint. Wiggum tries to take the gun, but accidentally shoots himself. He is then rushed to the hospital.
As Wiggum recovers in the hospital, Homer is always at his side waiting for him to wake up from his coma. When Wiggum finally comes around, Homer asks him if he can go see his family, as he has not seen them for a few days. Wiggum reluctantly lets him go, but it's not long before Homer is confronted by him at Moe's. Wiggum accuses Homer of being a bad friend and wants Eddie and Lou to arrest him, but they don't fell like doing so since it is not illegal to be a bad friend. Wiggum storms out and then goes missing.
Later, Eddie and Lou and Lou go to The Simpsons house and tell Homer that Wiggum has gone missing and asks where he could be. Homer eventually finds Wiggum at the cliff they were at earlier. The two then observe Fat Tony and two of his men making counterfeit clothing. Homer and Wiggum are caught and are thrown into the trunk of Fat Tony's car.
While he and Homer are trapped in the trunk, Wiggum finds a way for himself and Homer to escape by rearranging the CD tracks in the car, making Janis Ian's "At Seventeen" song play instead of dramatic music that Fat Tony wanted Louie to play. Homer and Wiggum soon make their escape and arrest Fat Tony and his gang.
After Fat Tony and his gang are arrested, Homer and Wiggum make up and later go to hassle Ned Flanders in a helicopter, pretending to be God.