Original: It was set to music by Kurt Weill for the 1927 "Songspiel" Mahagonny and used again in Weill's and Brecht's 1930 opera Rise and Fall of the City of Mahagonny.
Simplified: The "Alabama Song" comes from the 1930 operetta Rise and Fall of the City of Mahagonny.