The Last Hero: Book 7 in the Rincewind arc.
Rincewind - This is where it all began. The first two books are written in quite a different style, and it’s not for everyone. However for those that stick it out you will uncover a highly satirical version of London from both the eyes of a tourist and a local.
He's been a legend in his own lifetime. He can remember the great days of high adventure. He can remember when people didn't tell you off for killing dragons. But he can't always remember, these days, where he put his teeth.
Now, Cohen the Barbarian is going on one final quest. He's going to climb the highest mountain in the Discworld and meet his gods. He doesn't like the way they let men grow old and die. The last hero in the world is going to return what the first hero stole. With a vengeance.
That'll mean the end of world, if no one stops him in time. Someone is going to try. So who knows who the last hero really is?
A message, carried by pointless albatross, arrives for Lord Vetinari from the Agatean Empire. The message explains that the Silver Horde (a group of aged barbarians introduced in Interesting Times, wherein they conquered the Empire, and led by Cohen the Barbarian, now the Emperor) have set out on a quest. The first hero of the Discworld, "Fingers" Mazda, stole fire from the gods and gave it to mankind (analogous to Prometheus), and was chained to a rock to be torn open daily by a giant eagle as punishment. As the last heroes remaining on the Disc, the Silver Horde seek to return fire to the gods with interest, in the form of a large sled packed with explosive Agatean Thunder Clay. They plan to blow up the gods at their mountain home, Cori Celesti. With them is a whiny, terrified bard, whom they have kidnapped so that he can write the saga of their quest. Along the way, they are joined by Evil Harry Dread (the last Dark Lord) and Vena the Raven-haired (an elderly heroine who has now gone grey).
The heroes are disillusioned with the way their lives have turned out—having conquered the Empire, they have nothing left to do but die in comfort—and are angry for having been allowed to grow old, rather than dying in battle as most of their friends did. They decided to go out on the quest after one of the Horde members choked to death on a cucumber. Evil Harry is just as angry; despite his efforts to give his opponents the sporting chance that an Evil Overlord should, they won't follow the Code by allowing him to escape in return.
The Wizards of Unseen University explain to Lord Vetinari that blowing up Cori Celesti will destroy the Discworld by temporarily disrupting the Disc's magical field—the only thing holding the Disc together—so Vetinari organises an effort to stop the Horde. Since the Horde is already near the centre of the Discworld and the home of the gods, speed is of the essence. Vetinari recruits Leonard of Quirm to design the Discworld's second known spacecraft to slingshot under the Discworld and back around the top, landing on Cori Celesti.
The vessel, named "The Kite" by Leonard, can carry only three people. Leonard of Quirm, Captain Carrot Ironfoundersson, and Rincewind are selected for the trip. The Librarian accidentally stumbles aboard as well, having fallen asleep behind some crates of equipment while loading The Kite. After a few mishaps, including landing on the moon (to replenish their oxygen supply after the Librarian's unexpected presence threatened to leave them without enough air to survive the trip) and nearly having their swamp dragon powered spaceship explode on them, they crash in a spectacular fashion at, or rather, into the main gate of Cori Celesti.
Meanwhile, the Horde have already reached Cori Celesti. The gods allow them to sneak in disguised as gods themselves, despite (or perhaps because of) their having been betrayed to the gods by Evil Harry. The Horde suspect that the gods have been manipulating their entire quest. Fate challenges Cohen to a game where he must roll higher than what Fate rolls on a standard 6-sided die. After Fate rolls a 6, Cohen cheats Fate by slicing the die in-half in mid-air with his sword; the two halves land with the 6 and 1 both facing up. Cohen also notes that even if he doesn't succeed in killing the gods, someone will have tried, so someone will eventually try harder.
Captain Carrot attempts to arrest the Horde, at which point the Horde arms the explosives. While initially intending to attack him, the Horde realise that as a single brave man outnumbered by his foes and trying to save the world, Carrot is a Hero (and probably a king in disguise), and so their defeat is certain. After Rincewind explains that the detonation will destroy the entire Discworld, the Horde grab the explosives and throw them—and themselves—off the mountain.
As punishment for creating The Kite (which allowed humans to travel higher than the gods) and for not expressing belief in the gods, Leonard is ordered by the gods to paint the entire ceiling of the Temple of Small Gods with a spectacular mural of the whole world (despite Blind Io saying he would be satisfied with "a nice duck-egg blue with a few stars"). They impose a time limit of 10 years on the task—unassisted, "even with the scaffolding". (Leonard finishes the task in a few weeks.) Carrot asks for a boon to allow for the repairs of The Kite so that they can return to Ankh-Morpork. Rincewind asks for a blue balloon and the Librarian asks for some library supplies (and a red balloon) and manages to refrain from bouncing Blind Io's head on the ground after Io calls him 'a monkey'.
The Horde's end is ambiguous. Valkyries come to take the heroes to the Halls of the Slain, where a feast has been prepared for them. Instead, the Silver Horde, refusing to accept their deaths, steal the valkyries' horses and set off to find other worlds to "do heroic stuff in." Death does not appear to them, as he often does when Discworld characters die, although he subsequently appears to Vena, and is evasive about whether he is "collecting".
After the Horde leave with the Valkyries' horses, their first stop is to visit Mazda where he is being punished, cut off his chains, give him something to drink, and leave him a sword so that he may deal with his punisher. The bard, changed by his experience, composes a new style of saga, one with musical accompaniment, about it.