"St. James Infirmary” was recorded by Louis Armstrong and His All Stars May 17, 1947 in New York’s Town Hall.
The title possibly refers to St. James Hospital, London, which was a religious foundation for the treatment of leprosy, closed in 1532 after Henry VIII acquired the land to build St. James Palace.
"St. James Infirmary Blues" is an old song based on the 18th century traditional English folk song "The Unfortunate Rake" (or "The Unfortunate Lad" or "The Young Man Cut Down in His Prime"). There are many versions of the song scattered throughout the world plus a few derivatives like "The Streets of Laredo".
"The Unfortunate Rake" tells of a young man who caught something nasty from a girl (salts of mercury were used to treat syphilis). Variations often tell the story of a young person (usually male) "cut down in their prime" as a result of their morally dubious actions. For example, when the song moved to America, gambling and alcohol became common causes death.
THE UNFORTUNATE RAKE
As I was a-walking down by St. James' Hospital,
I was a-walking down by there one day,
What should I spy but one of my comrades
All wrapped up in flannel though warm was the day.
I asked him what ailed him, I asked him what failed him,
I asked him the cause of all his complaint.
"It's all on account of some handsome young woman,
'Tis she that has caused me to weep and lament.
"And had she but told me before she disordered me,
Had she but told me of it in time,
I might have got pills and salts of white mercury,
But now I'm cut down in the height of my prime.
"Get six young soldiers to carry my coffin,
Six young girls to sing me a song,
And each of them carry a bunch of green laurel
So they don't smell me as they bear me along.
"Don't muffle your drums and play your fifes merrily,
Play a quick march as you carry me along,
And fire your bright muskets all over my coffin,
Saying: There goes an unfortunate lad to his home."