This proverb sounds as though it is from the Bible. In fact, it isn’t, although it was a favourite of Victorian Christian moralists who championed the value of hard work and moral diligence.
The first expression of the idea behind the proverb is found in the writings of the great English scientists and philosopher Sir Francis Bacon. In Advancement of Learning, 1605, he wrote:
Cleanness of body was ever esteemed to proceed from a due reverence to God, to society, and to ourselves.
The best known use of the phrase was by the preacher John Wesley, in his Sermon “On Dress“, which he gave around the year 1791:
Let it be observed, that slovenliness is no part of religion; that neither this, nor any text of Scripture, condemns neatness of apparel. Certainly this is a duty, not a sin. “Cleanliness is, indeed, next to godliness.”
It is worth noting that Wesley was pointing out that physical cleanliness, although to be encouraged, was not a religious requirement. There’s nothing in the Bible that requires believers to be clean of body, only pure of heart.