On 22 June 1816, Lord Byron and his contemporary and friend Percy Bysshe Shelley were sailing on Lake Geneva (referred to as "Lac Leman", the French name, throughout the poem) and stopped to visit the Château de Chillon. After touring the castle (and walking through the dungeon in which Bonivard was imprisoned), Byron was inspired by Bonivard's story and composed The Sonnet of Chillon.
Because of torrential rainfall, Byron and his companion rested at a hotel in Ouchy following their tour. In late June or early July (several early drafts and copies present conflicting dates), Byron composed the longer fable. The work was probably completed by 2 July 1816. The Prisoner of Chillon was first published as The Prisoner of Chillon and Other Poems by John Murray on 5 December 1816.