This modern-sounding phrase is in fact at least as early as Shakespeare. He used it in Othello, 1604:
"I am one, sir, that comes to tell you your daughter and the Moor are now making the beast with two backs."
Shakespeare may have been the first to use it in English, although a version of it appears in Rabelais' Gargantua and Pantagruel, circa 1532. This was translated into English by Thomas Urquhart and published posthumously around 1693:
"In the vigour of his age he married Gargamelle, daughter to the King of the Parpaillons, a jolly pug, and well-mouthed wench. These two did oftentimes do the two-backed beast together, joyfully rubbing and frotting their bacon 'gainst one another."
Check back in the coming weeks to see the finished work.