A story is told of a man named Shamil, a leader of the Georgian tribes that lived in Russia's Caucasian Mountains over a century ago. The Russian army attacked the Georgians, intending to deprive them of their freedom. Unable to vanquish the valiant Georgians in battle, the Russian army leaders proposed a false peace treaty, and thus succeeded in getting them to lay down their arms. Immediately afterwards, the Russians lured the Georgian leader, Shamil, away from his stronghold and imprisoned him.
Exiled and helpless, Shamil yearned for his earlier freedom and fortune. He consoled himself with the knowledge that he would eventually be released and returned to his former position with even more power and glory. His ardent yearning was expressed in a sad yet hopeful song.
Chassidim sing Shamil's melody because its true story is an allegory for the chronicles of the soul. Each soul descends into this world from the heavens, clothed in the body of a human being. Its physical garments, in a sense, are its prison cell, for it constantly longs for the spiritual freedom and fulfillment it knew. It strives to liberate itself from the "exile" of the human body by directing the body's physical activity into the path of Torah and mitzvos, anticipating the time when it will leave this world behind and once again ascend into the lofty spiritual realms.
Sichos Kodesh of the Rebbe, Simchas Torah, 5719