The title is sometimes rendered "When The Midnight Choo-Choo Leaves For Alabam" (with or without the hyphen). The song was published by Ted Snyder of New York in 1912; Berlin was hired as staff lyricist by the Ted Snyder Company in 1909, and in the period 1907-14, co-wrote 42 songs with Snyder, but he wrote this one by himself the year after his massive hit with "Alexander's Ragtime Band
Whether or not Berlin ever visited Alabama, he grew up in New York, lived there and died there - in 1989 at the age of 101. Trains don't go to Alabama - it is a state not a city. Nevertheless, this has become something of a jazz standard, although more discerning listeners may prefer to wait for the choo choo to Chattanooga, Tennessee.