Bach wrote the cantata in 1724 in his second year in Leipzig for the 24th Sunday after Trinity. That year, Bach composed a chorale cantata cycle, begun on the first Sunday after Trinity. The prescribed readings for the Sunday were from the Epistle to the Colossians, a prayer for the Colossians (), and from the Gospel of Matthew, the story of the Raising of Jairus' daughter (). The cantata is based on "Ach wie flüchtig, ach wie nichtig", a hymn in 13 stanzas by Michael Franck (1652), to a melody by Johann Crüger (1661), "a meditation on the transience of human life and of all earthly goods". This aspect is the only connection to the gospel. An unknown poet retained the first and the last stanza unchanged the outer movements 1 and 6 of the cantata. He derived the four inner movements as a sequence of alternating arias and recitatives from the inner stanzas. John Eliot Gardiner points out that "several of Bach's late Trinity season cantatas" concentrate on "the brevity of human life and the futility of earthly hopes".
