See biography by C. A. Manning (1957); studies by H. F. Babinsky (1974), O. Subtelny (1981), and T. Mackiw (1983).
Mazepa was born circa 1639 near Bila Tserkva, then a part of Polish-Lithuanian Commonwealth, into a noble family. He was educated first in the Kyiv-Mohyla Academy, then at a Jesuit college in Warsaw and abroad. From 1659 he served at the court of the Polish king, John II Casimir.
In 1669–1673, Mazepa served under Hetman Petro Doroshenko, and in 1674–1681, under Hetman Ivan Samoylovych. A young educated Mazepa quickly rose through the Cossack ranks and in 1682–1686, he served as a General Yesaul.
In 1687, Ivan Mazepa accused Samoylovych of conspiring to secede from Russia, secured his ouster and was elected the Hetman of the Left-bank Ukraine, with the support of Vasily Galitzine's Muscovite government.
Gradually, Mazepa accumulated great wealth, becoming one of Europe's biggest land owners. A multitude of churches were built all over Ukraine during his reign in the Ukrainian Baroque style. He expanded the Kyiv-Mohyla Academy, the primary educational institution of Ukraine at the time, to accommodate 2,000 students, founded schools and printing houses. Many Cossacks, however, grew increasingly frustrated with the repressive and authoritarian rule of the Hetmanate nobility (starshyna). Several uprisings against his rule, started in the Zaporizhian Sich, failed.
In 1702, the Cossacks of Right-bank Ukraine, under the leadership of hetman Semen Paliy, began an uprising against Poland, which after early successes was defeated. Mazepa convinced Russian Tsar Peter I to allow him to intervene, which he successfully did, taking over major portions of Right-bank Ukraine, while Poland was weakened by invasion of Swedish king Charles XII. Fearing the popularity of Paliy, Mazepa had him exiled to Siberia.
In the beginning of the 18th century, as the Russian Empire suffered setbacks in the Great Northern War, Peter I decided to reform the Russian army and to centralize control over his realm. In Mazepa's opinion, the strengthening of Russia's central power could put at risk the broad autonomy granted to the Hetmanate under the Treaty of Pereyaslav in 1654. Attempts to assert control over the Cossacks included demands of having them fight in any of the tsar's wars, instead of just defending their own land against regional enemies as was agreed to in the treaty. Now Cossack forces had to fight in distant wars in Livonia and Lithuania, instead of protecting their own homes from the Tatars and Poles. Unequipped and not properly trained to fight on par with the modern European armies, Cossacks suffered heavy losses and lowered morale, as their commanders were Russians and Germans who often did not much value their lives and military abilities. The population of Ukraine had to bear the presence of the Russian army, which was accused of disrespectful behaviour and looting in Ukrainian cities where it was stationed. The hetman himself started to feel his post threatened in the face of increasing calls to replace him with one of the abundant foreign generals of the Russian army, or with a Russian.
The last straw in the souring relations with Tsar Peter was his refusal to commit any significant force to defend Ukraine against the Polish King Stanislaus Leszczynski, an ally of Charles XII of Sweden, who threatened to attack the Cossack Hetmanate in 1708. Peter expected that king Charles of Sweden was going to attack and decided he could spare no forces. In the opinion of Mazepa, this blatantly violated the Treaty of Pereyaslav, since Russia refused to protect Ukraine's territory and left it to fare on its own. As the Swedish and Polish armies advanced towards Ukraine, Mazepa allied himself with them on October 28, 1708. Only about 3,000 Cossacks followed their hetman, while others remained loyal to the tsar. This was partly due to Orthodox clergymen's agitation for the tsar. The Russian army, however, sought revenge by razing the Cossack capital Baturyn, killing the defending garrison and all of its population. The Russian army was ordered to tie up the dead Cossacks to crosses, and float them down the Dnieper River all the way to the Black Sea. This was in the hope of scaring all the people loyal to Mazepa who lived along the river.
Those Cossacks who did not side with Mazepa elected a new hetman, Ivan Skoropadsky, on November 11, 1708. The fear of other reprisals and suspicion of Mazepa's newfound Swedish ally prevented most of Ukraine's population from siding with him. Surprisingly, the only significant support which he gathered came from the Zaporizhian Sich, which, though at odds with the hetman in the past, considered him and the nobility he represented a lesser evil compared with the tsar. The Sich Cossacks paid dearly for their support of Mazepa, seen as a traitor by Russians. The Sich was destroyed in 1709 and a decree was issued to execute any active Zaporizhian Cossack.
The Swedish and Russian armies spent the first half of 1709 maneuvering for advantage in the anticipated great battle, and trying to secure the support of the local populace. Finally in June the Battle of Poltava took place. It was won by Russia, putting an end to Mazepa's hopes of transferring Ukraine into the control of Sweden, which in a treaty had promised independence to Ukraine. Mazepa fled with Charles XII to the Turkish fortress of Bendery, where Mazepa soon died.
Mazepa's decision to abandon his allegiance to the Russian Empire was considered treason by the Russian tsar and a violation of the Treaty of Pereyaslav. However others argue that it was Imperial Russia who broke the treaty, because it failed to even try to protect the Cossack homeland while busy fighting abroad. The image of a disgraceful traitor persisted throughout Russian and Soviet history. The Russian Orthodox Church excommunicated him. A positive view of Mazepa was taboo in the Soviet Union and considered as a sign of "Ukrainian bourgeois nationalism". During the years of Perestroika, however, many historical works saw light which viewed Mazepa differently. After Ukraine's independence in 1991, Mazepa was proclaimed a national hero in Ukraine's official historiography and mainstream media, because he was the first post-Pereyaslav Treaty hetman to take a stand against the Tsar, who failed to ratify that Treaty. This view however is still disputed by the pro-Russian factions. Mazepa's portrait is found on Ukrainian currency - the 10 hryvnia bill.
The historical events of Mazepa's life have inspired many literary and musical works: