The libretto was based on Charles Simon Favart and Marie Favart's text for Annette et Lubin, a comédie mêlée d'ariettes with music by Adolphe Benoît Blaise, which was in turn based on Jean-François Marmontel's morality tale of the same name.
In Marmontel's story two orphaned cousins, Annette and Lubin, are raised together and later fall in love.
When Annette becomes pregnant, the village priest and the magistrate forbid them to marry on the grounds of incest, but the local lord eventually persuades the Pope to allow the marriage.
Peter und Ännchen premiered on 29 September 1809 in the theatre of the Ludwigsburg Palace near Stuttgart.
The opera was popular in Germany in its day and a version of the score for voice and piano was published by Breitkopf & Härtel.