Don Quixote falls ill with a fever. Sancho never leaves his side, and his other friends visit him often. They believe his illness was caused by his disappointment in being defeated and Dulcinea not being restored to him. Hoping to cheer Quixote up, Samson buys some dogs to guard the flock Quixote planned to tend as a shepherd.
The physician has a poor prognosis. Don Quixote falls asleep for a long time, and when he wakes up, he claims he is cured of his madness. He regrets his foolishness in believing the books about chivalry. He wishes to make amends so not to leave behind a reputation for being a madman. He wishes to make his confession and his will.
His friends don't believe he is cured at first, but eventually they become convinced.
In his will, he leaves Sancho the money he has owed him and begs his forgiveness in pulling him into such foolishness. Sancho begs him not to die. They can become shepherds, and maybe the will find Dulcinea disenchanted after all.
He leaves money to his executor, and makes his niece his heir. Samson and the curate are his executors. He makes a stipulation that if his niece marries, the man is not to know anything about chivalry--and if he does, and she still marries him, she will be disinherited. The inheritance will go to charity.
Also, if his executors ever meet the author who wrote the book about him, the are to beg his forgiveness on his behalf for inspiring him to write such nonsense.
Don Quixote dies. Sancho is comforted by his inheritance. The curate asks for the notary to give testimony that Quixote died of natural causes so no other author can resurrect him. Many villages would claim he is born to them.
Samson Carrasco left an epitaph that Quixote lived the life of a madman but died with his senses restored. Cide Hamete writes that he alone was meant to write the adventures of Don Quixote, and no other author is to resurrect him.