The Kingis Quair

The Kingis Quair ("The King's Book") is a fifteenth-century poem attributed to James I of Scotland. It is semi-autobiographical in nature, describing the King's capture by the English in 1406 on his way to France and his subsequent imprisonment by Henry IV of England and his successors, Henry V and Henry VI. 
Summary.
The poem begins with the narrator who, alone and unable to sleep, begins to read Boethius' "Consolation of Philosophy". At first, he reads in the hope that it will help him get back to sleep, but he quickly becomes interested in the text and its treatment of Boethius' own experience of misfortune. At last, he begins to think about his own youthful experience, and how he came to a life of misery. On hearing the Matins bell, he rises and begins to write a poem describing his fate. He begins with a sea voyage taken when he was twelve years of age, when he was captured and imprisoned for eighteen years. Whilst in prison, he feels isolated, believing himself to be the most miserable man living. The sight of birds singing outside his prison window draws him back into the outside world. Looking out, he sees a beautiful woman, and falls in love. This woman is ultimately to be the means of his liberation, and this sequence of events closely parallels the biography of James I of Scotland. James's imprisonment came to an end with his marriage to Joan Beaufort whose name may be punningly referenced in the 'flour jonettis' which the beloved lady wears in her hair (stanza 47).
When the lady departs, the narrator becomes desperately sad, and eventually falls into a trance. In a dream, he visits three goddesses, who address his love-problem. The first, Venus, admits that she has no authority in this case, and directs him to Minerva, who probes the nature of his love. Once satisfied that his desires are pure, rather than being simple lust, she advises him on the nature of free will, telling him that he must cultivate wisdom if he is to avoid being prey to changing fortunes. Finally, he descends to the earthly paradise, where he sees Fortune and her wheel, which fill him with fear. Fortune sets him to climb on her wheel, and, as she pinches his ear, he awakes.
Consumed by doubt, the narrator is reassured by the appearance of a turtle dove carrying a message, signalling the beneficent quality of his vision. The narrator claims that Fortune kept her promise to him by increasing his wisdom, so that he is now in a state of happiness with his beloved. The poem closes with the narrator offering thanks to all who, at the end of the poem, brought about his good fortune, and a dedication to the 'poetis laureate' Geoffrey Chaucer and John Gower. The poem's penultimate verse repeats its first line, 'heigh in the hevynnis figure circulere', so that its structure echoes that of the celestial spheres that it evokes.
Rhyming Scheme.
The "Kingis Quair" uses the Chaucerian rhyme scheme rhyme royal: ABABBCC. The form was once thought to have been named for James I's usage, but scholars have since argued that it was named for its reference to the French "chant royal".
Bibliography.
The poem is the subject of "A Royal Poet," in "The Sketchbook" by Washington Irving (1820).