Garfield, Lorenzo Music, is woken by Binky the Clown Thom Huge on a TV segment that kicks off Halloween night, and the feline’s heart instantly leans toward the candy-filled excitement of trick-or-treating. The mood is amplified by a special singing moment from Lou Rawls performing "This is the Night (Trick or Treat)," setting a playful yet eerie tone for what’s ahead. Eager for mischief and sweets, Garfield hatches a plan with his canine companion, Odie Gregg Berger: trick Odie into thinking dogs must trick-or-treat with cats and spare almost all the candy except one piece for the dog. Odie, drawn by the promise of a small reward, agrees, and the pair heads to the attic to rummage a trunk of old costumes, where Garfield ultimately picks a pirate look for both of them.
That evening, the duo joins other neighborhood kids on the trick-or-treat circuit. Odie admits some fear at the sight of scary characters, and Garfield reassures him that the frightening figures are only kids in masks—though one by one, masks are lifted and the pair find that some figures are truly supernatural. As night deepens, Garfield decides to push farther by crossing a river to visit more houses, guiding Odie toward a rowboat moored at a nearby dock. A miscommunication cracks the plan: when Garfield tells Odie to “put out the oars,” the dog misreads the command and spills the oars overboard, leaving their boat adrift and at the mercy of the current.
Their fragile voyage drifts them to an abandoned dock beside a rundown mansion. Believing the place deserted, the two step inside, only to encounter an old man sitting in an armchair. He unfolds a chilling legend: exactly a hundred years earlier, pirates had buried treasure beneath the mansion floor and swore to return at midnight, even if it meant rising from the grave. The man claims to be the mansion’s former cabin boy, adding a personal connection to the tale. As Garfield and Odie start to retreat, the old man vanishes, and the pair bolts for the door—only to watch in horror as he steals their boat, leaving Garfield and Odie stranded and dismayed.
Midnight tolls from the grand clock, and a ghostly ship materializes on the river while pirate specters rise from the water. The pair duck into an empty cupboard to hide, watching as the ghosts reclaim their long-buried treasure from the mansion’s floorboards. A sneeze from Odie betrays their location, and the two are forced to scramble for safety. They sprint toward the river and leap into the dark water to escape; Odie heroically rescues Garfield, who cannot swim and even loses his pirate hat in the escape. The two are carried ashore and discover their candy still aboard the boat, untouched and waiting.
Back home, Garfield grudgingly but fairly shares the spoils with Odie, grateful for the dog’s bold rescue. Curious about what’s on the television, Garfield discovers that the old man who claimed to be part of the pirates’ lore is actually the host of a late-night pirate movie festival, a twist that reframes the evening’s events in a surreal wink. With the strange adventure behind them, Garfield switches off the TV, settles in for a quiet end to Halloween, and drifts off to sleep, knowing the night’s thrills are finally over.