The origins of this song are unclear. It apparently evolved in the early 1900s from a number of similarly titled gospel songs including "When the Saints Are Marching In" (1896) and "When the Saints March In for Crowning" (1908). The first known recorded version was in 1923 by the Paramount Jubilee Singers on Paramount 12073. Although the title given on the label is "When All the Saints Come Marching In", the group sings the modern lyrics beginning with "When the saints go marching in". No author is shown on the label. Several other gospel versions were recorded in the 1920s, with slightly varying titles but using the same lyrics, including versions by The Four Harmony Kings (1924), Elkins-Payne Jubilee Singers (1924), Wheat Street Female Quartet (1925), Bo Weavil Jackson (1926), Deaconess Alexander (1926), Rev. E. D. Campbell (1927), Robert Hicks (AKA Barbecue Bob, 1927), Blind Willie Davis (1928), and the Pace Jubilee Singers (1928).
The earliest versions were slow and stately, but as time passed the recordings became more rhythmic, including a distinctly up tempo version by the Sanctified Singers on British Parlophone in 1931. Even though the song had folk roots, a number of composers claimed copyright in it in later years, including Luther G. Presley and Virgil Oliver Stamps, R. E. Winsett, and Frank and Jim McCravy. Although the song is still heard as a slow spiritual number, since the mid-20th century it has been more commonly performed as a "hot" number. The tune is particularly associated with the city of New Orleans. A jazz standard, it has been recorded by a great many jazz and pop artists.
Both vocal and instrumental renditions of the song abound. Louis Armstrong was one of the first to make the tune into a nationally known pop tune in the 1930s. Armstrong wrote that his sister told him she thought the secular performance style of the traditional church tune was inappropriate and irreligious.[citation needed] Armstrong was in a New Orleans tradition of turning church numbers into brass band and dance.
The song is apocalyptic, taking much of its imagery from the Book of Revelation, but excluding its more horrific depictions of the Last Judgment. The verses about the Sun and Moon refer to Solar and Lunar eclipses; the trumpet (of the Archangel Gabriel) is the way in which the Last Judgment is announced. As the hymn expresses the wish to go to Heaven, picturing the saints going in (through the Pearly Gates), it is entirely appropriate for funerals.
[source : Wikipedia.org]