Zaphod Beeblebrox IV is Zaphod Beeblebrox's (the former President of the Galaxy) deceased great-grandfather. He helps Zaphod, Ford, Arthur, Trillian, and Marvin escape the Vogons in The Restaurant at the End of the Universe by teleporting them to safety using his dead-person-powers. He is rather ill-tempered at times, and holds his great-grandson (who he calls "Zaphod the Nothingth") in contempt for being so irresponsible. It is he who explains Zaphod's original plans for finding the 'man running the universe.'
It is shown in the book that he also has two heads and could be a feature passed on (thanks to an accident with a time machine and contraceptive) by Zaphod Beeblebrox himself.
Due to an accident with the aforementioned time machine and a contraceptive, Zaphod Beeblebrox is Zaphod Beeblebrox I (or the Nothingth, accoding to great-grandad), his father Zaphod Beeblebrox II, his grandfather Zaphod Beeblebrox III, and his great-grandfather Zaphod Beeblebrox IV.
He also gives Arthur a parting gift of tea ('the most delicious he [Arthur] had ever tasted') in a silver teapot after he hears that the Heart of Gold's circuits were occupied because of Arthur's efforts to teach the Nutri-Matic Drink Synthesizer to make tea.