The Hitchhiker's Guide to the Galaxy is a 1979 British science fiction comedy novel adaptation of the first four parts of The Primary Phase, the first part of The Hitchhiker's Guide to the Galaxy radio series, both written by Douglas Adams.
The Hitchhiker's Guide to the Galaxy sees Arthur Dent, an average Englishman living in the country, waking to a wrecking crew ready to demolish his home to make way for a bypass. Shortly afterward, he's onboard an extraterrestrial spacecraft alongside his good friend, Ford Prefect, as Earth is obliterated by an alien civilization to make way for a bypass.
The novel was the first in The Hitchhiker's Guide to the Galaxy series of books, with an additional four seeing publication in 1980, 1982, 1984, and 1992 respectively. A sixth book titled And Anothing Thing... was released in 2009, being the only one not authored by Douglas Adams, who passed away in 2001, but by Eoin Colfer with permission granted from Adams's estate.
After awaking to a wrecking crew preparing to bulldoze his home, Arthur Dent blocks them by laying on the ground of their incoming path. Arthur's friend, Ford Prefect, arrives and takes Arthur to the local pub after convincing the foreman to take his place on the ground. There, Ford reveals to Arthur that he is an alien from a planet in the vicinity of Betelgeuse, and that the world is about to end.
In disbelief, Arthur leaves the pub only to witness his house utterly destroyed by the demolition crew. Ford chases after him just as a fleet of ships belonging to the Vogons, a race of highly-bureaucratic aliens, arrive and announce the immediate destruction of Earth. Equipping his electronic thumb, Ford grabs Arthur and teleports them both to one of the ships as the planet is eradicated by the Vogons.
Onboard the ship, Ford further elaborates to Arthur who he is, explaining his employment with Megadodo Publications, and that he was conducting field research for the latest edition of The Hitchhikers Guide to the Galaxy, an interstellar travel guide for hitch-hikers. The two are eventually captured by the Vogons and taken to the Vogon captain, Jeltz, to be subjected to his excruciating poetry, which the Vogons are infamous for. Arthur and Ford try to fake praise for his work, but are thrown into space anyway.
Against all odds, they are rescued in 29 seconds by the Heart of Gold, captained by Zaphod Beeblebrox, the two-headed President of the Galaxy and semi-cousin to Ford. Also onboard are Trillian, originally Tricia McMillan, whom Arthur originally met at a party before leaving with Zaphod, and Marvin, a perpetually depressed android. The ship soon comes into orbit of Magrathea, home to the Magratheans who once crafted custom planets for the megarich leading to them amassing so much wealth it crashed the galactic economy. However, their presence triggers an automated warning from the planet, stating Magrathea is out of business and to leave immediately. Missiles are launched toward the Heart of Gold, but Arthur is able to save them when he triggers the Infinite Improbability Drive, which transforms the two missiles into a pot of flowers and a sperm whale. Meanwhile, Trillian notices her pet white mice, taken from Earth, have escaped.
They subsequently land on Magrathea, where Zaphod, Trillian, and Ford following Trillian's white mice and Arthur and Marvin stay behind as lookouts. Arthur then meets Slartibartfast, a Magrathean who helped design planets, even winning an award for his work on Norway. Slartibartfast gives Arthur a tour, leaving behind Marvin, of the planet's interior where they are currently working on a new planet, which Arthur recognises as Earth. Arthur learns the Magratheans have been commissioned by some mice to rebuild the planet, as Earth was destroyed five minutes too early before the "Ultimate Question" could be answered.
Slartibartfast elaborates the mice are in actuality pan-dimensional beings in search of the meaning to life, the universe and everything. They originally constructed a magnificent computer called Deep Thought, who after 7 million years delivered the answer 42, which did not satisfy the pan-dimensional beings. However, Deep Thought promised to design a computer that would provide a more satisfactory answer, Earth. Only, the Vogons destroyed it five minutes before it was due to calculate the answer.
Trillian's pet mice are indeed the pan-dimensional beings, and decide Arthur, as a by-product of the computer, has the Question imprinted into his brain and offer a cash in exchange for it. When Arthur refuses, the mice decide to extract it themselves, however a diversion allows Arthur to escape. When Arthur reunites with everybody else, the galactic police arrive, intending to arrest Zaphod for stealing the Heart of Gold. Luckily, the galactic policemen die following the failure of their life support system, due to Marvin depressing their mothership's computer to the extent of it killing itself, taking the life support system with it.
With their long adventure drawing to a close, they all head to the Restaurant at the End of the Universe for some lunch.
Television and film adaptation
The novel was highly influential in the creation of the 1981 television adaptation of the series, which saw various voice actors from the radio series reprise their roles, such as Simon Jones as Arthur Dent. The series also took inspiration from the second novel, The Restaurant at the End of the Universe.
The 2005 film adaptation saw the majority of its plot taken from the first novel, with an altered ending resulting in a more happier ending than in any other adaptation of the story. Stephen Fry, who portrays the voice of the Guide in the film, would go on to narrate an audiobook of the novel.