One blustery day, SpongeBob and Patrick are watching clouds. Suddenly, something strange and glowing floats overhead. SpongeBob suggests that it's a haunted houseboat, but Patrick isn't convinced, so he marches up the creaky stairs and goes inside, with SpongeBob nervously following him. Patrick thinks the boat is lame, but SpongeBob thinks it is real. With a flash of lightning and a roar of thunder, a ghostly pirate captain appears. SpongeBob asks him why he's visited Bikini Bottom. The ghostly pirate captain explains that his boat's engine is broken and it needs a new gasket.
The ghostly pirate captain then puts SpongeBob's and Patrick's souls into bottles and gives SpongeBob a doubloon to buy a new head gasket. He says that if they do not return with a new head gasket in 24 hours, SpongeBob and Patrick will become part of his ghastly crew forever. The two of them then run away screaming from the haunted house boat all the way to the Krusty Krab. They burst through the doors and tell Mr. Krabs about the ghost, broken engine, gold coin, and treasure chest. After hearing this, Mr. Krabs marches outside and takes a gasket from a car. He returns with the gasket and demands to visit the ghost so he can steal all of his gold. Sandy then appears with ghost catcher equipment and wants to catch some ghosts.
Later on, the ghost hunters return to the creepy old houseboat. They tiptoe the creaky floors and search the shadowy rooms. SpongeBob suddenly finds gold doubloons. Mr. Krabs giggles with joy as he runs to the treasure chest, shoves clawfuls of coins into bags, and throws them to Squidward and Patrick. The ghost pirate materializes with a flash of lightning and wonders who took his gold. SpongeBob informs him that they brought a gasket for his engine, noting that they hoped the ghost would give him and Patrick their souls back.
SpongeBob then hands the gasket to a ghostly crew member, who floats away to fix the engine. The ghost captain pours a bottle of orange fluid into SpongeBob's head. He throws another bottle to Patrick, who drops it. The bottle breaks, and Patrick quickly starts licking up the spill. The ghost captain states that you can't really take a person's soul and the orange fluid is just old orange juice.
Meanwhile, Mr. Krabs is trying to sneak away with the gold. As he slowly pulls open a door, it lets out a long creak. The ghost pirate hears it and swoops after him.
Suddenly, the door swings all the way open. Mr. Krabs, Squidward, and Patrick are sucked into a strange black emptiness with no up or down. The ghost captain then says that nobody escapes the ghost Void with an evil laugh. Back on the houseboat, Sandy jumps into action. Energy bolts fly from her ghost catcher and pull Mr. Krabs, Squidward, and Patrick out of the Void. As Mr. Krabs and the ghost captain began to fight over the gold, SpongeBob made a discovery. He finds the gold, which turns out to belong to the Flying Dutchman, seeing as his name and phone number are written on the treasure chest.
The ghost captain states that he took the Flying Dutchman's gold a long time ago and has never found it since. A cannonball abruptly crashes the door and reveals the Flying Dutchman! He is there to reclaim his gold doubloons. SpongeBob whispers that it might be a good time to leave at that point. He drags Mr. Krabs out the door, and his friends follow along. Once they are out of the haunted houseboat, SpongeBob claims you should always report stolen property to the authorities and especially haunted treasure.
SpongeBob and Patrick are running from Lord Poltergeist with Patrick carrying a chest and the Haunted House Boat and Charlie are in the background.
Lord Poltergeist is referred to as "Ghost captain" in this book.
If one looks closely at the book cover, Charlie can be seen.
In the episode this book is based on, it ends with SpongeBob and friends getting chased by the Flying Dutchman and getting stuck in a void. However, in the book, it ends with SpongeBob and his friends leaving the haunted houseboat.