Though Mazeppa left Poland with revengeful feelings, and greatly contributed to the victories of Peter the Great, it seems he never lost completely the memory of Poland. In his heart he desired to be an independent sovereign, but he never wished to be under the Russian I yoke, and was besides this infinitely superior, by his education, to the generality of the Russian generals, who cast on him a jealous eye, and he was more than once obliged to submit tamely to great insults from his haughty master. Once, when the latter openly avowed the project either of exterminating the Cossacks, or of bending them to the same obedience as his Russian subjects, Mazeppa ventured to remonstrate; when Peter the Great, excited by wine, threatened to punish his remark by a cruel death. From that time the hetman was more prudent, and adapted his language, his conduct, and even his dress, to his master's taste; the better to deceive him, and so escape the watchful eyes of his numerous enemies, he feigned sudden illness, went to bed, displayed signs of sinking life, spake often of God, frequently confessed, and in his confessions more than once hinted into the ear of the priest that his services were not sufficiently great for repaying his master's favours, for whom he was always ready to sacrifice his life. He bequeathed part of his wealth to the priests, purchased indulgences, kissed their hands, showing them humiliating submission, and though of vigorous health, he manifested all the signs of a speedy departure to the other world. During his dreams he often pronounced some words favourable to the czar, to whom everything was reported. In the meantime the hetman was secretly preparing the insurrection among the Cossacks; his friends were hinting to them that the czar intended to make them slaves, to govern them as peasants, and transport them to Siberia, and that unmistakable documents were found on that subject; that those who were faithful to the Russians were traitors; and some of H them who were suspected to be so, were skilfully exposed to great dangers in their conflicts with the Turks and Tatars, where they perished. He found means to establish a correspondence with the sultan of Turkey in the most secret manner, as well as with Charles XII. For the latter he professed the greatest admiration, and promised to join him with all his men, to exterminate the Russian corps scattered in the Ukraine, provided he might have the duchy of Severy ceded to him as a principality, and also the title of hetman of all the Cossacks, whom he wished to bring back to the Polish domination.
Charles XII., however, seems to have been very careless about Mazeppa's promises, and had not much reliance on the Cossacks. Thanking Mazeppa for his offers, he advised him to postpone his defection. This unlucky delay placed the Cossack chief in a very dangerous position. Already alarming rumours respecting his projects were propagated, and even the czar was apprised of them; but Mazeppa played his cards so well, that the czar, considering as traitors all who suspected Mazeppa's fidelity, sent him, under a strong escort, his two principal accusers, Iskra and Kotczubey. Mazeppa was obliged to sacrifice them for his safety, and they were both killed by three strokes of sharp hammers on their heads in his presence (a punishment reserved to traitors among the Cossacks). The czar also, wishing to give him a more decided mark of his imperial favour, invited him to proceed to Kiof, to lay with him the first stone of the fortress of that town. Mazeppa, who had left his bed, convoked all the subordinate chiefs, and sent his own nephew Woynaroski to the czar, requesting him to govern the Cossacks with more liberality. Before, however, that deputation reached Moscow, one of his letters was intercepted: the czar ordered Woynaroski to be immediately put in irons, and gave peremptory orders to all his generals to forcibly prevent the junction of the Cossacks with the king of Sweden. He liberated from Siberia all persons sent there by Mazeppa's influence. He also put in circulation the rumour that all the defeats of the Cossacks by the Swedes were attributable to the treason of their own hetman, who wished to reduce the Greek church to the caprices of the Pope and Lutheranian court. In fact, nothing was spared to blacken his character, and to lower him in their estimation.
Mazeppa saw that the time was come for action. He therefore marched towards the Dnieper, collected provisions, put in a good state of defence the towns of Gotchi, Tchernigof, and especially Baturin, and joined the king of Sweden with 15,000 Cossacks in the vicinity of the river Desna. He soon after made a favourable treaty with the Zaporogues, renewed the correspondence with the Turks favourable to his cause, and neglected nothing that could improve the situation of the Swedish army, and contribute to the success of his projects.