The lyrics of the airs in the piece are set to popular broadside ballads, opera arias, church hymns and folk tunes of the time.
After appearing in several comedies, and then in numerous repetitions of The Beggar's Opera, she ran away with her married lover, Charles Powlett, 3rd Duke of Bolton.
The original idea of the opera came from Jonathan Swift, who wrote to Alexander Pope on 30 August 1716 asking "...what think you, of a Newgate pastoral among the thieves and whores there?"
[9] The work took satiric aim at the passionate interest of the upper classes in Italian opera, and simultaneously set out to lampoon the notable Whig statesman Robert Walpole, and politicians in general, as well as such notorious criminals as Jonathan Wild, the thief-taker, Claude Duval, the highwayman, and Jack Sheppard, the prison-breaker.
It also deals with social inequity on a broad scale, primarily through the comparison of low-class thieves and whores with their aristocratic and bourgeois "betters."
The airs of The Beggar's Opera in part allude to well-known popular ballads, and Gay's lyrics sometimes play with their wording in order to amuse and entertain the audience.
[10] Gay used Scottish folk melodies mostly taken from the poet Allan Ramsay's hugely popular collection The Gentle Shepherd (1725) plus two French tunes (including the carol "Quelle est cette odeur agréable?"
Contrarily, John Richardson in the peer-reviewed journal Eighteenth-Century Life has argued that Macheath is powerful as a literary figure precisely because he stands against any interpretation, "against expectation and illusion.
"[12] He is now thought to have been modeled on the gentleman highwayman, Claude Duval,[13][14] although interest in criminals had recently been raised by Jack Sheppard's escapes from Newgate.
[16] Mrs Peachum, overhearing her husband's blacklisting of unproductive thieves, protests regarding one of them: Bob Booty (the nickname of Robert Walpole).
Macheath goes to a tavern where he is surrounded by women of dubious virtue who, despite their class, compete in displaying perfect drawing-room manners, although the subject of their conversation is their success in picking pockets and shoplifting.
Polly narrowly avoids the poisoned drink, and the two girls find out that Macheath has been recaptured owing to the inebriated Mrs Diana Trapes.
(17 February 1728)[17] Two weeks after opening night, an article appeared in The Craftsman, the leading opposition newspaper, ostensibly protesting at Gay's work as libellous and ironically assisting him in satirising the Walpole establishment by taking the government's side:
But they seem to forget that there are such things as Innuendo's (a never-failing Method of explaining Libels)… Nay the very Title of this Piece and the principal Character, which is that of a Highwayman, sufficiently discover the mischievous Design of it; since by this Character every Body will understand One, who makes it his Business arbitrarily to levy and collect Money on the People for his own Use, and of which he always dreads to give an Account – Is not this squinting with a vengeance, and wounding Persons in Authority through the Sides of a common Malefactor?
In 1776, John Hawkins wrote in his History of Music that due to the opera's popularity, "Rapine and violence have been gradually increasing" solely because the rising generation of young men desired to imitate the character Macheath.
The political satire, however, was even more pointed in Polly than in The Beggar's Opera, with the result that Prime Minister Robert Walpole leaned on the Lord Chamberlain to have it banned, and it was not performed until fifty years later.
There are no indications of dance music, accompanying instrumental figures or the like, except in three instances: Lucy's "Is Then His Fate Decree'd Sir" – one measure of descending scale marked "Viol."