Of course Cervantes would write Don Quixote as a quest story: Don Quixote himself tries to base his life on all the knights' quests he has read about over the years. He first hears the "call of knight-errantry" when he's sitting in his library and reading book after book about medieval knights and their fabulous adventures. Eventually, the Don decides that he wants to get in on the action, so he digs out an old suit of armor and starts riding around the countryside. By doing so, he hopes to prove his manliness to his beloved Dulcinea del Toboso, a woman he has never actually seen or met.
When Don Quixote and his sidekick Sancho set out into the world of adventure, they encounter all kinds of dangers and temptations… at least in Don Quixote's imagination. For starters, Don Quixote's overactive imagination gets them into all kinds of physical altercations, most of which leave the Don and his sidekick nearly clobbered to death. On top of that, Don Quixote thinks that the women around him are constantly trying tempt him sexually. Nevertheless, the Don remains committed to his beloved Dulcinea and never gives in. In addition, he benefits from the "hospitality" of a Duke and Duchess who find his madness very amusing. Of course, Don Quixote doesn't realize that these people are making fun of him the whole time.
Arrival and Frustration
In Part 2 of the novel, Don Quixote is brutally disappointed when he meets the young woman whom Sancho has told him is Dulcinea del Toboso. The woman is nothing more than a burly country girl. But Sancho's explanation is that Dulcinea has been enchanted by an evil wizard, and Don Quixote must find a way to break the curse. The Don eventually discovers that the only way to break the curse (according to the fibbing Duke and Duchess) is for Sancho to take 3,300 lashes on the bum. Sancho refuses to undergo this punishment, however, and Don Quixote despairs of ever seeing Dulcinea in her beautiful, non-cursed form.
The Final Ordeals
On a trip to Barcelona, Don Quixote is challenged to a duel by the Knight of the White Moon, who is actually the university graduate Sansón Carrasco in disguise. Don Quixote loses the duel and gives up his life of knight-errantry as punishment. In this sense, his mock quest comes to an end, and it is a failed quest in the sense that he loses the final ordeal. But it's a success in the sense that it eventually leads Don Quixote to recover his sanity.
At this point in a knight's quest, the knight is supposed to make a thrilling escape from death. But Cervantes's book gives us a failed version of the quest. Why? Because Cervantes is trying to be real. He's trying to show people how stupid these quest stories are to begin with. So instead of escaping death, Don Quixote falls sick and quietly dies. For good measure, Cervantes has it so that Don Quixote uses his final words to give a speech about how dumb quest stories are.