Imam Shamil was born in 1797, in the small village (aul) of Gimry, which is in current-day Dagestan, Russia. He was originally named Ali, but following local tradition, his name was changed when he became ill. His father, Dengau, was a landlord, and this position allowed Shamil and his close friend Ghazi Mollah to study many subjects including Arabic and logic. Shamil established himself as a well-respected and educated man of Quran and Sunnah among other Muslims of the Caucasus.
Shamil was born at a time when the Russian Empire was expanding into the territories of the Ottoman Empire and Persia (see Russo-Persian War (1804-1813) and Russo-Turkish War (1806–1812)). Following the Russian invasion, many Caucasian nations united in resistance to harsh Tsarist rule in what became known as the Caucasian War. Some of the earlier leaders of Caucasian resistance were Sheikh Mansur and Ghazi Mollah. Shamil was actually childhood friends with the Mollah, and would become his disciple and counsellor.
Shamil's favorite wife, Anna Ivanovna Ulykhanova (1828-1877), was an ethnic Armenian Christian from Mozdok who had been abducted as a teenager by Muslim rebels in the early 1840s. During her captivity, she converted to Islam and adopted the name "Shuanet," remaining loyal to Shamil even after his capture and exile to Russia. After Shamil's death in 1871, she moved to the Ottoman Empire where she was assigned a pension from the sultan.
In 1832, Ghazi Mollah died at the battle of Gimry, and Shamil was one of only two Murids to escape, but he sustained severe wounds. During this fight he was stabbed with a bayonet. After jumping from an elevated stoop "clean over the heads of the very line of soldiers about to fire on him. Landing behind them, whirling his sword in his left hand he cut down three of them, but was bayoneted by the fourth, the steel plunging deep in his chest. He seized the bayonet, pulled it out of his own flesh, cut down the man, and with another superhuman leap, cleared the wall and vanished in the darkness". He went into hiding and both Russia and Murids assumed him dead. Once recovered, he emerged from hiding and rejoined the Murids, led by the second Imam, Gamzat-bek. He would wage unremitting warfare on the Russians for the next quarter century and become of the legendary guerrilla commanders of the century. When Gamzat-bek was murdered by Hadji Murad in 1834, Shamil took his place as the prime leader of the Caucasian resistance and the third Imam of the Caucasian Imamate. In 1839 (June–August), Shamil and his followers, numbering about 4000 men, women and children, found themselves under siege in their mountain stronghold of Akhoulgo, nestled in the bend of the Andi Koysu, about ten miles east of Gimry. This epic siege lasted eighty days, finally resulting in a Russian victory. The Russians suffered about 3000 casualties taking the stronghold, while the rebels were slaughtered in extremely bitter fighting (which was typical of the war, with no quarter asked for nor given). Shamil and a small party of his closest followers, including some family, managed to escape down the cliffs and through the Russian siege lines during the final days at Akhoulgo. Following his escape he once again set about regaining his following and resisting the Russian occupation. Shamil was effective at uniting the many, quarrelesome Caucasian tribes to fight against the Russians, by the force of his charisma, piety and fairness in applying Sharia law. One Russian source commented on him as "a man of great tact and a subtle politician." He believed the Russian introduction of alcohol in the area corrupted traditional values. He made effective use of guerrilla warfare tactics and the resistance continued under his leadership until 1859. His fortunes as a military leader rose after he was joined by Hadji Murad, who defected from the Russians in 1841 and tripled by his fighting the area under Shamil's control within a short time. Hadji Murad, who was to become the subject of a famous novella by Leo Tolstoy (1904), turned against Shamil a decade later, apparently disappointed by his failure to be anointed Shamil's successor as imam. Shamil's elder son was given that nomination, and in a secret council, Shamil had his lieutenant accused of treason and sentenced to death, on which Hadji Murad, on learning of the judgement, redefected to the Russians. On August 25, 1859, Shamil and his family, by agreement with the Russian Czar, were guests for some days.
After his capture, Shamil was sent to Saint Petersburg to meet the Emperor Alexander II. Afterwards, he was exiled to Kaluga, then a small town near Moscow. After several years in Kaluga he complained to the authorities about the climate and in December, 1868 Shamil received permission to move to Kiev, a commercial center of the Empire's southwest. In Kiev he was afforded a mansion in Aleksandrovskaya Street. The Imperial authorities ordered the Kiev superintendent to keep Shamil under "strict but not overly burdensome surveillance" and allotted the city a significant sum for the needs of the exile. Shamil seemed to have liked his luxurious detainment, as well as the city; this is confirmed by the letters he sent from Kiev.
In 1859 Shamil wrote to one of his sons: "By the will of the Almighty, the Absolute Governor, I have fallen into the hands of unbelievers ... the Great Emperor ... has settled me here ... in a tall spacious house with carpets and all the necessities". Shamil while in Russian captivity apparently adopted the line of the Tsar and said that his "compatriots" (many of whom never were loyal to him in the first place, especially the Chechens) should stop fighting as it was pointless. The fight continued, however, as Chechens and Avars dismissed his advice and continued to fight for a couple of more years. Shamil's memory now varies from group to group. Among some of the groups that he had considered part of his Imamate (whether they wanted to be part of it or not), like the Chechens, he is regarded as a man who merely went for power, good because he fought the Russians well, but good for nothing else. Many still admire him, the Chechen mujahid Shamil Basayev was named after him.
In 1869 he was given permission to perform the Hajj to the holy city of Mecca. He traveled first from Kiev to Odessa and then sailed to Istanbul, where he was greeted by Ottoman Sultan Abdulaziz. He became a guest at the Imperial Topkapı Palace for a short while and left Istanbul on a ship reserved for him by the Sultan. In Mecca, during the pilgrimage, he met and conversed with Abdelkader El Djezairi. After completing his pilgrimage to Mecca, he died in Medina in 1871 while visiting the city, and was buried in the Jannatul Baqi, a historical graveyard in Medina where many prominent personalities from Islamic history are interred. Two elder sons, (Cemaleddin and Muhammed Şefi), whom he had to leave in Russia in order to get permission to visit Mecca, became officers in the Russian army, while two younger sons, (Muhammed Gazi and Muhammed Kamil), served in the Turkish army whilst their daughter Peet'mat Shamil went on to marry Sheikh Mansur Fedorov, an Imam who later absconded from the Russian Empire out of fear for he and his children's life. He fathered 11 children, one being John Fedorov who changed his name to John Federoff after migrating to Childers in Queensland, Australia where he established a sugar cane farming empire. He is also the inventor of the first prototype of the sugar cane harvester.
Said Shamil, a grandson of Imam Shamil, became one of the founders of the Mountainous Republic of the Northern Caucasus, which survived between 1917 and 1920 and later, in 1924, he established the "Committee of Independence of the Caucasus" in Germany.