Deathtrap is the 19th episode of Season 9 on NBC series Frasier.
The episode opens with a flashback to 1964 at Bryce Academy, Frasier and Niles' old school. They sneak into a storage room and snatch a human skull used in teaching, intending to put it in their backyard production of Hamlet. When Niles picks it up from the shelf, he accidentally drops it on Frasier's head, leaving a fracture in the skull. In the present, Frasier, Niles and Daphne are at Café Nervosa, where Frasier challenges a talented barista with a long, complicated order, which he, to Frasier's annoyance, succeeds in making. Niles informs him that their childhood home is on the market. They make plans to buy it and convert it into a bed & breakfast. When they go to the house to inspect it, they meet Mr. Lasskopf, the owner. Though they find that the house is too small for a bed & breakfast, they remember putting a "memory box" containing some childhood treasures under the floor and realize that they forgot it there. They ask to look for the loose floorboard it was placed under, but Lasskopf refuses to let them do so since all boards have been nailed down and he wants to sell the house.
Later at night, Frasier and Niles break into the house together to look for the memory box. After pulling up one of the boards, they find the human skull they stole from the school years earlier and don't remember doing so. When Frasier notices the cracks on the back of the skull (which were made when Niles dropped it on him in 1964), they come to believe that the skull is a murder victim. Back at Frasier's apartment, Roz arrives with Alice and wants to consult with Frasier on a matter; her dog ate Alice's hamster and she is uncertain how to break it to her since Alice hasn't had anything die before. At the house, Frasier and Niles, inspired by the memory of them writing The Crane Boys' Mysteries when they were younger, try to solve the "murder" themselves. They theorize that the skull is Mrs. Lasskopf, who left the neighborhood when they were in elementary school and would fight with her husband all the time. While Niles continues tearing up the floor looking for more body parts, finding the memory box in the process, Frasier finds some old financial documents that show that Mr. Lasskopf had some kind of financial windfall around the time his wife disappeared. They figure that she inherited a lot of money and Mr. Lasskopf convinced her to evict the Cranes, killed her, hid the body under the floor and got her inheritance for himself.
At Frasier's apartment, Roz has gone to a pet store to buy Alice a new hamster without her knowing, hoping to convince her that the old one just went missing and she found it. When Martin tries to comfort her, he accidentally reveals that the hamster is dead and tells her about "animal heavens". Alice asks her if Eddie will go there soon, and Martin says he is still "a puppy". Alice remarks that he is 10 years old, which is old for a dog. When Alice sees her new hamster, she says she likes it better than the old one. After she and Roz have left, Martin calls Eddie to him and hugs him affectionately. Back at the house, Frasier and Niles have called the police to the premises and had Mr. Lasskopf, who is understandably astonished, arrested. When they look inside the memory box and find the program for their backyard production of Hamlet, they realize their mistake and leave discreetly.