Charlemagne's army is fighting the Muslims in Spain. They have been there for seven years, and the last city standing is Saragossa, held by the Muslim king Marsilla. Threatened by the might of Charlemagne's army of Franks, Marsilla seeks advice and his wise man, Blancandrin, councils him to conciliate the Emperor, offering to surrender and giving hostages. Accordingly Marsilla sends out messengers to Charlemagne, promising treasure and Marsilla's conversion to Christianity if the Franks will go back to France.
Charlemagne and his men, tired of fighting, accept his peace offer and select a messenger to Marsilla's court. Protagonist Roland nominates his stepfather Ganelon as messenger. Ganelon, who fears to be murdered by the enemy and accuses Roland of intending this, takes revenge by informing the Saracens of a way to ambush the rear guard of Charlemagne's army, led by Roland, as the Franks re-enter Spain through the mountain passes.
As Ganelon predicted, Roland leads the rear guard, with the wise and moderate Oliver and the fierce Archbishop Turpin. The Muslims ambush them at Roncesvalles, and the Christians are overwhelmed. Oliver asks Roland to blow his olifant to call for help from the Frankish army; but Roland proudly refuses to do so.
The Franks fight well, but are outnumbered, until almost all Roland's men are dead and he knows that Charlemagne's army can no longer save them. Despite this, he blows his olifant to summon revenge, until his temples burst and he dies a martyr's death. Angels take his soul to Paradise.
When Charlemagne and his men reach the battlefield, they find the dead bodies of Roland's men, who have been utterly annihilated, and pursue the Muslims into the river Ebro, where they drown. Meanwhile Baligant, the powerful emir of Babylon, has arrived in Spain to help Marsilla, and his army encounters that of Charlemagne at Roncesvalles, where the Christians are burying and mourning their dead. Both sides fight valiantly - when Charlemagne kills Baligant, the Muslim army scatters and flees, and the Franks conquer Saragossa. With Marsilla's wife Bramimonde, Charlemagne and his men ride back to Aix, their capital in France.
The Franks discover Ganelon's betrayal and keep him in chains until his trial, where Ganelon argues that his action was legitimate revenge, not treason. While the council of barons assembled to decide the traitor's fate is initially swayed by this claim, one man, Thierry, argues that, because Roland was serving Charlemagne when Ganelon delivered his revenge on him, Ganelon's action constitutes a betrayal.
Ganelon's friend Pinabel challenges Thierry to trial by combat, in which, by divine intervention, Thierry kills Pinabel. The Franks are convinced by this of Ganelon's villainy; wherefore he is torn apart by having four galloping horses tied one to each limb, and thirty of his relatives are hanged.