班揚開始創作這本書,是因為他違反英國政府頒佈的非正式聚会法1664年(英语:Conventicle Act 1664)而被判入貝德福德郡監獄。有關法案禁止國民參與英國國教以外的聚會。研究班揚生平早期的學者如約翰·布朗相信本書是在他第二次坐牢,即1675年時創作的。但更多的學者如羅傑‧沙羅克(Roger Sharrock)相信是他完成其精神的自傳 Grace Abounding to the Chief of Sinners(中譯《罪人受恩記》、《罪人頭目的赦免》)第一次坐牢時所作的。
As I walk'd through the wilderness of this world, I lighted on a certain place, where was a Denn; And I laid me down in that place to sleep: And as I slept I dreamed a Dream. I dreamed, and behold I saw a Man cloathed with Raggs, standing in a certain place, with his face from his own House, a Book in his hand, and a great burden upon his Back. I looked and saw him open the Book, and Read therein; and as he read, he wept and trembled: and not being able longer to contain, he brake out with a lamentable cry; saying, what shall I do?
^John Bunyan, The Pilgrim's Progress, W.R. Owens, ed., Oxford World's Classics, (Oxford: Oxford University Press, 2003), xiii: "... the book has never been out of print. It has been published in innumerable editions, and has been translated into over 200 languages." Cf. also F.L. Cross, ed., The Oxford Dictionary of the Christian Church, (Oxford: Oxford University Press, 1983), 1092 sub loco.