The proverb alludes to the temptation of Christ by the Devil (matthew iv) when the latter quotes a passage from Psalm xci.
The devil can cite Scripture for his purpose. An evil soul producing holy witness Is like a villain with a smiling cheek.
[1596 Shakespeare Merchant of Venice i. iii. 93]
Thus Candour's maxims flow from Rancour's throat, As devils, to serve their purpose, Scripture quote.
[1761 C. Churchill Apology 15]
Is any one surprised at Mr. Jonas making such a reference to such a book for such a purpose? Does any one doubt the old saw that the Devil (being a layman) quotes Scripture for his own ends.
[1843 Dickens Martin Chuzzlewit xi.]
The versatile personage in our popular proverbs, who‥quotes Scripture for his own ends.
[1937 ‘C. Dickson’ Ten Teacups xiii.]
The devil can quote Scripture, as we all know, so why not a politician?
[1997 Washington Times 25 July A4]
Related to: good and evil; hypocrisy
Bibliography of major proverb collections and works cited from modern editions is available here.