Although the moments spent in actual combat were both intense and terrifying, most of a soldier's life was tedium. He was either marching from one spot to another or waiting in camp for the next battle to be fought. To stave off boredom, he employed many methods of amusement, one of which was singing. Sentimental ballads, patriotic airs, hymns, and the 1860s equivalent of today's "Top 40" songs were all included in his repertoire, but nothing filled the bill quite like humour.
One of the best loved comic songs in the Confederate Army was "Here's Your Mule," which tells the story of a hapless farmer's efforts to keep track of the wandering mule that brings him to camp to sell his produce. It was so universally known and sung that it even rated a mention in another humorous classic, "Goober Peas."
Paul Glass, writing in Singing Soldiers, sees this song as a commentary on the problem of desertion, which plagued both armies. Irwin Silber, the editor and compiler of Songs of the Civil War, suggests that it has to do with Confederate general and well-known horse liberator John Hunt Morgan. Regardless of which interpretation you prefer, it remains one of those delightful nonsense songs that spring from the minds of men with too much free time on their hands.
As to what did happen to poor old muley, a number of possibilities exist. He may, indeed, have wandered off; he may have been "borrowed" by a soldier looking for the quickest way to put distance between himself and the army; he may have been appropriated by raiders from either army and pressed into military service; or he may have found his way into the cook's stewpot (mule steaks, roasts, and stews were not unknown entrees on Confederate mess tables).
"Here's Your Mule"