King Louis XVI of France might have had good intentions. Unfortunately, he proved incapable of ruling his deeply-indebted country, as shown by his failures in making his much-needed reforms stick. Eventually, Louis XVI was forced to call the Estates-General of 1789, which backfired when the representatives of the commoners started the French Revolution by declaring themselves the National Assembly.
From that point on, Louis XVI and his family were in a precarious position, being more-or-less prisoners in Paris. However, there were still revolutionary leaders who envisioned a continuing role for him as a constitutional monarch.
However, Louis XVI and his family tried to escape to the royalist stronghold of Montmédy for the purpose of launching a counter-revolution with foreign support, making everyone realize the war was inevitable.
Popular opinion of Louis XVI plummeted even further when Austria and Prussia issued the Brunswick Manifesto, which stated their intention of restoring him to his full power over the corpses of those who opposed said restoration. For a lot of people, that was the final proof that Louis XVI was conspiring with foreign powers against his own country.
As such, Louis XVI was formally arrested on August 13 of 1792. One faction of revolutionary leaders preferred to keep him as a hostage. However, that need faded when French soldiers beat their Prussian counterparts at the Battle of Valmy on September 22 of 1792.
The victory, combined with the further revelation of incriminating documents, caused Louis XVI to be put on trial for high treason and crimes against the state on December 11 of 1792. Both sides knew this decision would lead to his execution, thanks to the overwhelming evidence against him