Although its exact origins are unclear, the Serenity Prayer was most likely written in the early 1930s by an American theologian named Reinhold Niebuhr. It became associated with Alcoholics Anonymous in 1942 when a member noticed a version of it in an obituary and pointed it out to other members.
Niebuhr's daughter wrote a memoir in which she dates the writing of the Serenity Prayer to 1943. She says her father wrote it in response to the atrocities of World War II. However, there are text references of it found throughout the 1930s. These do still often credit Niebuhr, so he is the most likely author. However, in an interview, he noted that similar quotes may have existed before.
In accordance with the principles of Alcoholics Anonymous, the man who first brought the prayer to the organization is known only as Jack. The prayer resonated so strongly with the people running AA that it quickly started printing the prayer on small cards to share with other alcoholics. Some groups added additional verses to the prayer to help address issues specific to addiction.
Although it is most commonly associated with AA, other organizations have also shared the Serenity Prayer. It was published by the National Council of Churches. The USO also printed it on cards and gave it to soldiers serving in World War II.