In 1708 Peter sent Alexei to Smolensk to collect provender and recruits, and after that to Moscow to fortify it against Charles XII of Sweden. At the end of 1709, Alexei went to Dresden for one year. There, he finished lessons in French, German, mathematics and fortification. After his education, Alexei married, albeit greatly against his will Princess Charlotte of Brunswick-Wolfenbüttel, whose family was connected by marriage to many of the great families of Europe i.e., Charlotte's sister Elizabeth was married to Holy Roman Emperor Charles VI, ruler of the Habsburg Monarchy. In theory, Alexei could have refused the marriage, and he had been encouraged by his father to at least meet his intended. "Why haven't you written to tell me what you thought about her?" wrote Peter (in a tone that can only be guessed) in a letter dated August 13, 1710.
The marriage contract was signed in September. The wedding was celebrated at Torgau, the palace of the Queen of Poland, on October 14 1711. One of the terms of the marriage contract agreed to by Alexei was that while any forthcoming children were to be raised in the Orthodox faith, Charlotte herself was allowed to retain her Protestant faith (an agreement that did not sit well at all with Alexei's followers).
As for the marriage itself, it was a failure from the very start. Alexei pronounced his bride "pock-marked" and "too thin". He insisted on separate apartments and ignored her in public.
Three weeks later, the bridegroom was hurried away by his father to Toruń to superintend the provisioning of the Russian troops in Poland. For the next twelve months Alexei was kept constantly on the move. His wife joined him at Toruń in December, but in April 1712 a peremptory ukase ordered him off to the army in Pomerania, and in the autumn of the same year he was forced to accompany his father on a tour of inspection through Finland.
By Charlotte, he had two children.
After the birth of their first child (Natalia) in 1714, Alexei brought his long time Finnish mistress (Afrosinia) to live in the palace. Some historians speculate that it was his conservative powerbase's disapproval of this foreign, non-Orthodox bride, more so than her appearance, that caused Alexei to spurn the unhappy young woman.
Still, Peter did not despair. On the August 26, 1716 he wrote to Alexei from abroad, urging him, if he desired to remain tsarevich, to join him and the army without delay. Rather than face this ordeal, Alexei fled to Vienna and placed himself under the protection of his brother-in-law, the emperor Charles VI, who sent him for safety first to the Tirolean fortress of Ehrenberg (near Reutte), and finally to the castle of Sant'Elmo at Naples. He was accompanied throughout his journey by his mistress, the Finnish girl Afrosina. That the emperor sincerely sympathized with Alexei, and suspected Peter of harbouring murderous designs against his son, is plain from his confidential letter to George I of Great Britain, whom he consulted on this delicate affair. Peter felt insulted: the flight of the tsarevich to a foreign potentate was a reproach and a scandal, and he had to be recovered and brought back to Russia at all costs. This difficult task was accomplished by Count Peter Tolstoi, the most subtle and unscrupulous of Peter's servants.
In April 1718 fresh confessions were extorted from, and in regard to, Alexei. This included the words of Alexei's long time mistress Afrosinia, who had turned state's evidence. "I shall bring back the old people..." Alexei is reported to have told her,
"...and choose myself new ones according to my will; when I become sovereign I shall live in Moscow and leave Saint Petersburg simply as any other town; I won't launch any ships; I shall maintain troops only for defense, and won't make war on anyone; I shall be content with the old domains. In winter I shall live in Moscow, and in summer in Iaroslav."
Despite this and other hearsay evidence, there were no actual facts to go upon. The worst that could be brought against him was that he had wished his father's death. In the eyes of Peter, his son was now a self-convicted and most dangerous traitor, whose life was forfeit. But there was no getting over the fact that his father had sworn to pardon him and let him live in peace if he returned to Russia. The whole matter was solemnly submitted to a grand council of prelates, senators, ministers and other dignitaries on 13 June 1718. The clergy, for their part, declared the Tsarevich Alexei,
"...had placed his Confidence in those who loved the ancient Customs, and that he had become acquainted with them by the Discourses they held, wherein they had constantly praised the ancient Manners, and spoke with Distaste of the Novelties his Father had introduced."
Declaring this to be a civil rather than an ecclesiastical matter, the clergy left the matter to the tsar's own decision.
At noon on June 24, the temporal dignitaries -- the 126 members of both the Senate and magistrates that comprised the court -- declared Alexei guilty and sentenced him to death. But the examination by torture continued, so desperate was Peter to uncover any possible collusion.
On 19 June, the weak and ailing tsarevich received twenty-five strokes with the knout, and now, on the 24th, he was subject to fifteen more. On 26 June, Alexei died in the Petropavlovskaya fortress in Saint Petersburg, two days after the senate had condemned him to death for conspiring rebellion against his father, and for hoping for the cooperation of the common people and the armed intervention of his brother-in-law, the emperor.