In 1655, Bunyan became a deacon and began preaching, with marked success from the start. In 1658 he was indicted for preaching without a license. The authorities were fairly tolerant of him for a while, and he did not suffer imprisonment until November of 1660, when he was taken to the county jail in Silver Street, Bedford, and there confined (with the exception of a few weeks in 1666) for 12 years until January 1672. Bunyan afterward became pastor of the Bedford church. In March of 1675 he was again imprisoned for preaching publicly without a license, this time being held in the Bedford town jail. In just six months this time he was freed, (no doubt the authorities were growing weary of providing Bunyan with free shelter and food) and he was not bothered again by the authorities.
John Bunyan wrote The Pilgrim's Progress in two parts, of which the first appeared at London in 1678,which he had begun during his imprisonment in 1676. The second part appeared in 1684. The earliest edition in which the two parts were combined in one volume came out in 1728. A third part falsely attributed to Bunyan appeared in 1693. The Pilgrim's Progressis the most successful allegory ever written, and like the Bible has been extensively translated into other languages.
John Bunyan wrote many other books, including one which discussed his inner life and reveals his preparation for his appointed work is Grace Abounding to the Chief of Sinners (1666). Bunyan became a popular preacher as well as a very voluminous author, though most of his works consist of expanded sermons. In theology he was a Puritan, but not a partisan. He was no scholar, except of the English Bible, but that he knew thoroughly. He also drew much influence from Martin Luther's Commentary on the Epistle to the Galatians.
Some time before his final release from prison Bunyan became involved in a controversy with two theologians of his day: Kiffin and Paul. In 1673 he published his Differences in Judgement about Water-Baptism no Bar to Communion, in which he took the ground that "the Church of Christ hath not warrant to keep out of the communion the Christian that is discovered to be a visible saint of the word, the Christian that walketh according to his own light with God." While he agreed as a Baptist that water baptism was God's ordinance, he refused to make "an idol of it," and he disagreed with those who would dis-fellowship from Christians who did not adhere to water baptism
Kiffin and Paul published a rejoinder in Serious Reflections (London, 1673), in which they set forth the argument in favor of the restriction of the Lord's Supper to baptized believers. The controversy resulted in the Particular (Calvinistic) Baptists leaving the question of communion with the unbaptized open. Bunyan's church permitted pedobaptists (those who baptize children, such as the Calvinistic Presbyterian Church) to fellowship and eventually, Bunyan’s church even became a pedobaptist church.
On a trip to London, John Bunyan caught a severe cold, and he died at the house of a friend at Snow Hill on August 31, 1688. His grave lies in the cemetery at Bunhill Fields in London.