The term lip service means insincere support or respect expressed but not put into practice—cf. also to bow (down) in the house of Rimmon.
The fact that it originally referred to prayer as a mere formal practice does not seem to have been noted yet.
The term is first recorded in A treatise against witchcraft (Cambridge, 1590), by Henry Holland (circa 1556-1604), English priest and writer on witchcraft:
Satan sometimes would preach the gospell him selfe, and he seemeth to loue it, and to delight to heare it sounding: else wherefore would his wicked exorcistes, and coniurers so often chatter it vnto him: And by the maid which had the spirit of diuination at Philippi, he cried, or made her speake: these men are the seruants of the most high God which shewe vnto vs the way of salvation: And in the Gospell it is written they doe most honourably speake of Christ; thou art Christ the very sonne of God.
I answere, those wicked exorcists and coniurers delight Satan much in abusing with their prophane lippes, the holy worde of God: for the truth is, he nothing regardeth the outwarde letter of the worde, no more then their characters, signes, crosses, figures, &c. but this he will haue them doe, the more to blinde them and others, and to keepe men in the externall lippe seruice, least men shoulde vnderstand the powerfull working vertue of that holie word and the graces of true religion.
The second-earliest occurrences of lip service that I have found are from A Saint or a Brute. The Certain Necessity and Excellency of Holiness, &c. (London, 1662), by Richard Baxter (1615-91), English Puritan theologian; in the Introduction, he quotes the Gospel of Matthew, 15:8 (where Jesus cites the Book of Isaiah, 29:13) and the Gospel of John, 4:24:
Matt. 15.8.9. This people draweth near me with their lips, but in their hearts are far from me—]
John 4.23.24. God is Spirit, and they that worship him, must worship him in spirit and truth.]
Richard Baxter’s comment is:
From such texts it is evident that [Every Godly man doth make the inward exercise of his soul the principal part of his worship unto God, and doth not stick in bodily exercise, or lip-service.]
Later, Baxter asks the reader:
Whether you have used to allow God half an hours lip-service or formal drowsie prayer at night, when you have served the world and flesh all day?
Among the other early occurrences of the term, all of which denoting prayer as a sort of mechanical physical exercise, the following is from Directions and Prayers for the Use of the Patients in the Hospital in Southwark (London, 1738):
Since many who are received into this House cannot read, and others who can, are now too weak to do it; such of you therefore as read best, and have strength sufficient for it, ought in duty to your fellow-patients, to read often to them such Psalms and Chapters in the Bible as are hereafter set down; and sometimes this short Book of Directions, and the Prayers that follow, which may serve to furnish them with suitable thoughts, and proper words for putting up their requests to God, that he would grant them such things as they want.
But let each one be careful that his devotions do not become mere lip-service, and a matter of form; but that the desires and affections of his heart may always accompany his prayers.