Demolition and Revelation
The story begins on an ordinary Thursday morning for Arthur Dent, who is trying to stop his house in West Country, England, from being demolished for a bypass. His friend, Ford Prefect, arrives and says he is an alien from near Betelgeuse, and that Earth is about to be demolished for a hyperspace bypass. Ford pulls a protesting Arthur to a local pub, buys them six pints of beer, and then manages to hitch a ride on a Vogon constructor fleet ship moments before Earth is destroyed. Arthur is in shock and disbelief, struggling to understand the sudden end of his world and his best friend's true identity.
Vogon Poetry and Rescue
Aboard the Vogon ship, Arthur and Ford are found by Captain Prostetnic Vogon Jeltz, who makes them listen to his poetry, considered the third-worst in the universe. After this torture, Jeltz orders them thrown into space, thinking they are spies. With only 30 seconds of oxygen left, Arthur and Ford are miraculously saved by the Infinite Improbability Drive of a passing spaceship, the *Heart of Gold*. This sudden rescue, against all odds, introduces them to the universe's absurdities and the unpredictable nature of their new reality, showing the sheer improbability that guides their lives.
Meeting Zaphod and Trillian
Arthur and Ford find themselves aboard the *Heart of Gold*, a revolutionary spaceship powered by the Infinite Improbability Drive. They soon discover the ship's crew includes Zaphod Beeblebrox, Ford's semi-cousin and the President of the Galaxy (who stole the ship), and Trillian, a human woman Arthur had met at a party on Earth. Also aboard is Marvin, a constantly depressed robot. Arthur is especially surprised to see Trillian, as he had tried to meet her unsuccessfully at a party on Earth, only to be outmaneuvered by Zaphod, who arrived in a spaceship. This reunion is awkward and adds another strange coincidence to Arthur's already confusing space journey.
The Quest for Magrathea
Zaphod Beeblebrox reveals his seemingly illogical plan: to travel to the legendary planet Magrathea. Magrathea is a mythical planet, long thought to be a fable, whose inhabitants supposedly built planets for wealthy clients. The coordinates for Magrathea are a closely guarded secret, and Zaphod's wish to find it comes from a mysterious impulse and a desire to uncover its secrets. The crew, including a confused Arthur and a curious Ford, begin this improbable journey, not fully understanding Zaphod's reasons but carried along by the *Heart of Gold*'s improbable power and Zaphod's unpredictable leadership. Their destination holds the key to the universe's greatest secret.
Arrival at Magrathea and Missile Attack
Upon arriving in the Magrathean system, the *Heart of Gold* faces an automated missile defense system, which launches two ancient nuclear missiles at them. Zaphod, in a moment of panic, suggests using the Infinite Improbability Drive to escape, but Marvin, in his usual pessimistic way, notes that the drive is already active. Through sheer improbable luck, the missiles turn into a bowl of petunias and a sperm whale, which then hit the planet's surface. This strange event allows the *Heart of Gold* to land safely on Magrathea, further showing the unpredictable and absurd nature of the universe they inhabit and the power of their unique ship.
Slartibartfast and the Earth's Purpose
On Magrathea, Arthur is separated from the others and meets Slartibartfast, an elderly Magrathean planet designer. Slartibartfast reveals the surprising truth: Earth was not a natural planet but a supercomputer, commissioned by pan-dimensional beings (who appear as white mice) to calculate the Ultimate Question of Life, the Universe, and Everything. The answer to this ultimate question, 42, had already been given by the supercomputer Deep Thought, but the question itself remained unknown. Earth's destruction by the Vogons was an unfortunate interruption, as the computer was minutes from finishing its calculations. Arthur is completely confused by this news, his entire understanding of existence shattered.
The Mice's Demand
Meanwhile, Zaphod, Ford, and Trillian are captured by the pan-dimensional beings, who reveal themselves as the super-intelligent mice Frankie and Benjy. These mice were the true masters behind the Earth project and are desperate to get the Ultimate Question. They believe that since Arthur was the last sentient being on Earth before its destruction, his brain might contain the final piece of the puzzle. They propose to extract Arthur's brain to find the question, much to Arthur's horror. This sinister demand shows the extreme lengths some beings will go to for knowledge and the comical yet terrifying situation Arthur finds himself in.
Confrontation and Escape
As the mice prepare to operate on Arthur, an alarm sounds, indicating the arrival of two intergalactic police officers, who have been tracking Zaphod for stealing the *Heart of Gold*. In the resulting chaos, Marvin, the depressed robot, manages to disable the police officers by talking to their spaceship's computer, causing it to commit suicide from sheer boredom and depression. This unexpected action allows Arthur, Ford, Zaphod, and Trillian to escape the mice and their brain-extraction plans. They quickly return to the *Heart of Gold*, leaving the frustrated mice behind. The escape shows Marvin's unique, though melancholic, abilities.
The Restaurant at the End of the Universe
Having just escaped Magrathea and the mice, the *Heart of Gold* crew decides to find refuge and a meal. Zaphod suggests visiting the legendary Milliways, the Restaurant at the End of the Universe. This restaurant exists within a time bubble at the very end of time, letting patrons see the universe's final moments while enjoying a gourmet meal. The idea of such an extravagant experience appeals to Zaphod's pleasure-seeking nature and offers a temporary break from their dangerous adventures. They set a course for Milliways, ready for another improbable journey and a truly unique dining experience.
The Search for a New Restaurant
The book ends with the crew setting off for the Restaurant at the End of the Universe. However, a slight malfunction with the Infinite Improbability Drive during their journey causes them to land on a different planet than intended. They find themselves on a desolate, ancient world, where they meet a mysterious figure who appears to be a prophet. This unexpected detour puts their immediate culinary plans on hold and sets the stage for further adventures. The ending leaves Arthur and his companions in a new, puzzling situation, hinting at the continuation of their intergalactic misadventures and the unpredictable nature of the universe.