Feeling bored, Garfield, Lorenzo Music looks into a closet and finds a trenchcoat and fedora. Donning both, he begins to fantasize he is Sam Spayed, a second-rate private investigator in a film noir atmosphere. Sam Spayed, Lorenzo Music then receives a visit from Tanya O'Tabby, a beautiful woman who hires Sam to investigate the death of her husband—Professor O'Tabby—who apparently drove off a clifftop road. Tanya believes it was murder, as her husband was an excellent driver, but the death was ruled a simple car accident. Despite initially suspecting foul play (that Tanya killed her husband either for his money or because he was unfaithful), Sam agrees to take the case.
No solid proof of murder emerges when Sam visits the morgue, although he notes that O'Tabby's shirt, chest and stomach hairs have yellowish-brown stains on them and secretly pockets a mysterious, painted “stone” that the coroner overlooked. Next, Sam goes to the university where O'Tabby worked and meets the late man's colleague and former advisor Professor O'Felix, C. Lindsay Workman. He tells Sam how O'Tabby was on his way to visit an elderly benefactress the night he died, but dismisses Sam's idea that the professor was having an affair, saying his one weakness was instead a coffee addiction.
Sam phones Tanya to tell her what he knows so far, only for his newly-hired secretary Kitty, Julie Payne, to spill coffee on him when he mentions talking to O'Tabby about O'Tabby's “woman trouble.” While cleaning himself up, Sam realizes that the “stone” is actually a ceramic fragment from a broken coffee mug and that the stains on the late professor's clothing and body must have been coffee. He deduces that Kitty worked for O'Tabby before she came to Sam's office, and accuses Kitty of O'Tabby's murder, believing her motive was that she loved O'Tabby but the professor didn't love her. Kitty breaks down into tears, insisting that she did not kill the professor, having simply left the university due to not having him. She also explains that she did more than make coffee for O'Tabby, also filling his prescriptions for potent sleeping pills to counter his coffee-induced insomnia.
Deducing O'Felix is the murderer, Sam brings him to court. O'Felix was jealous of his former student's success and, having had his eyes on O'Tabby's position within the university for some time, murdered him by spiking his coffee with some sleeping pills, causing O'Tabby to fall asleep at the wheel and drive off the cliff to his death. Tanya visits Sam one last time, making it very clear that the romance he had hoped to have with her will never happen. Kitty starts to seduce Sam, only for reality to intrude via owner Jon Arbuckle, Thom Huge, asking Garfield what he's doing in the closet. Garfield responds, Gettin' ready to roll the credits, pal!, and goes back in the closet, continuing his fantasy.