Chrétien de Troyes first mentions Sir Lancelot in Erec and Enide, his earliest surviving poem. Lancelot's name is third on the list of the importance of the knights of King Arthur's court. (Gawain is first and Erec, the hero of the tale, is second). In Cligés Lancelot is listed as one of the knights the story's hero must overcome.
In Le Chevalier de la Charrette which followed Cligés chronologically , Lancelot is the hero of the poem and is in that portrayed as the leading knight of the court. He also appears for the first time as lover of Queen Guinevere. The story of the Le Chevalier de la Charrette is the rescue of the queen from Meleagant who has kidnapped her.
In Perceval, le Conte du Graal, Chrétien's last publication, Lancelot is not mentioned, even though much of the action story takes place in King Arthur's court.
Continuations have been added later by other authors to Chrétien's unfinished work. Lancelot is not positioned as an important knight in these either. Of the fifteen knights selected by King Arthur to ride with him to Chastel Orguellous Lancelot only ranks ninth. In a Tristan episode added by Gerbert de Montreuil in his continuation, Lancelot is just one of the knights who was shamed by Tristan.
Only really in Le Chevalier de la Charette is Lancelot treated with the importance given to him in the prose romances.
Chrétien states that he composed this poem (which was completed by Godefroi de Leigni) at the request of the countess Marie de Champagne. Marie was the daughter of Louis VII of France and of Eleanor of Aquitaine. Both mother and daughter are said to have pushed the view that love between husband and wife was impossible, and that lovers were de rigeur in court.
Guenevere had therefore to have a lover. Lancelot was a suitable candidate for the post, and was written in to fill the role. Mordred, Guinevere's earlier lover, did not possess the necessary "glamour" for the role.
There is no evidence of the existence of a legend of Lancelot and Guinevere before the writing of the Chevalier de la Charrette.
Sir Lancelot, knight of the Round Table