From Martin Luther: Hymns, Ballads, Chants, Truth page 26-27:
A paraphrase of Psalm 12, this hymn was written in 1523, the same time as many of Luther’s other psalm-hymns. It was published in the first Lutheran hymnal, Achtliederbuch, of 1524. Luther’s version of the psalm reflects much of his own experience in the early days of the Reformation. Though several different tunes were used for this text with various levels of success, the present tune dates from 1524 and is possibly by Luther himself.