There are 52 chorale cantatas by Johann Sebastian Bach surviving in at least one complete version. Around 40 of these were composed during his second year as Thomaskantor in Leipzig, which started after Trinity Sunday 4 June 1724, and form the backbone of his chorale cantata cycle. The eldest known cantata by Bach, an early version of Christ lag in Todes Banden, BWV 4, presumably written in 1707, was a chorale cantata. The last chorale cantata he wrote in his second year in Leipzig was Wie schön leuchtet der Morgenstern, BWV 1, first performed on Palm Sunday, 25 March 1725. In the ten years after that he wrote at least a dozen further chorale cantatas and other cantatas that were added to his chorale cantata cycle.
Lutheran hymns, also known as chorales, have a prominent place in the liturgy of that denomination. A chorale cantata is a church cantata based on a single hymn, both its text and tune. Bach was not the first to compose them, but for his 1724-25 second Leipzig cantata cycle he developed a specific format: in this format the opening movement is a chorale fantasia on the first stanza of the hymn, with the hymn tune appearing as a cantus firmus. The last movement is a four-part harmonisation of the chorale tune for the choir, with the last stanza of the hymn as text. While the text of the stanzas used for the outer movements was retained unchanged, the text of the inner movements of the cantata, a succession of recitatives alternating with arias, was paraphrased from the inner stanzas of the hymn.