Miguel de Cervantes, aging and an utter failure as playwright, poet and tax collector, has been thrown into a dungeon in Seville to await trial by the Inquisition for an offense against the Church. There he is dragged before a kangaroo court of his fellow prisoners, who plan to confiscate his few possessions—including the uncompleted manuscript of a novel, Don Quixote.
Cervantes, seeking to save the manuscript, proposes his defense in the form of a play. The "court" agrees, and Cervantes and his manservant don make-up and costumes, transforming themselves into Don Quixote and Sancho Panza. They then play out the story with the prisoners taking the roles of other characters.
Quixote and Sancho take to the road in a quest to restore the age of chivalry, battle all evil, and right all wrongs. The famous battle with the windmill follows, with Quixote blaming his defeat on his enemy, the Great Enchanter.
In a roadside inn—which Quixote insists is really a castle—Aldonza, the inn's serving girl and part-time prostitute, is being propositioned by a gang of muleteers. Quixote sees her as the dream-ideal whom he will serve forever and insists her name is Dulcinea. Aldonza is confused and angered by Quixote's refusal to see her as she really is.
The padre and Dr. Carrasco arrive at the inn and are frustrated by Quixote's lunatic logic. They are interrupted by the arrival of an itinerant barber, and Quixote confiscates his shaving basin, believing it is the "Golden Helmet" of Mambrino.
Later Aldonza encounters Quixote in the courtyard where he is holding vigil, in preparation for being knighted by the innkeeper. She questions him on his seemingly irrational ways , and Quixote answers her with a statement of his credo, The Impossible Dream. Aldonza catches the fever of Quixote's idealism but, attempting to put it into practice, is cruelly beaten and ravaged by the muleteers.
Not knowing Aldonza's plight, Quixote and Sancho leave the inn, encounter a band of Gypsies, and are robbed. They return to the inn, only to encounter the disillusioned Aldonza who sings her denunciation of Quixote's dream in the dramatic Aldonza. The Knight of the Mirrors enters and defeats Quixote by forcing him to see himself as "naught but an aging fool." The knight reveals himself as Dr. Carrasco, sent by Quixote's family to bring him to his senses.
At home again, the old man who once called himself Don Quixote is dying. Aldonza, having followed, forces her way into the room and pleads with him to restore the vision of glory she held so briefly. Quixote, remembering, rises from his bed to reaffirm the stirring Man of La Mancha, but collapses, dying. Aldonza, having glimpsed the vision once more, refuses to acknowledge his death, saying, "My name is Dulcinea."
Back in Cervantes's dungeon the prisoners have been deeply affected by his story and restore to him his precious manuscript. Cervantes is summoned to his real trial by the Inquisition. The prisoners unite to sing him on his way with The Impossible Dream.