Andrei is in love with Mariya, but Mariya is in love with Ivan Mazeppa, who loves her back. Mazeppa is friends with Vasily Kochubey, Mariya's father, and asks him for permission to marry Mariya. Kochubey refuses, and a quarrel breaks out. Mariya intervenes, and when asked to choose between her family and Mazeppa, chooses to elope with Mazeppa. Kochubey, furious, reveals to his family and friends that he knows Mazeppa is plotting against the Tsar. He goes to inform the Tsar of the plot, but the Tsar doesn't believe him and turns him over to Mazeppa. He and Iskra, an associate of his, are sentenced to death.
Mariya is kept unaware of her father's imprisonment and impending execution. Mazeppa confides in Mariya that he hopes to become ruler of an independent Ukraine, a plan that Mariya supports. After he leaves, Mariya's mother, Lyubov, sneaks into Mazeppa's castle and tells Mariya that her father is going to be executed. Mariya is horrified and the two rush off to try to stop the execution. They arrive just as the axes fall; they are too late.
Mazeppa finally puts his plot into action, but he and his allies are defeated at the Battle of Poltava. As he and his remaining forces flee, he comes across Andrei. Andrei fights Mazeppa, but Mazeppa fatally wounds him. Mariya, who lost her sanity after witnessing her father's execution, has also wandered into the area. Mazeppa wants to bring her with him, but is convinced to leave her behind lest she slow down his retreat. Andrei dies in Mariya's arms, trying in vain to get her to come to her senses.