Carl Fredrik Ehrensvärd (January 7, 1767 – 1815) was a Swedish Freiherr, soldier, farmer and political writer who was convicted of involvement in the murder of Gustav III in 1792 and sentenced to death. The sentence was later changed by the supreme court and his life was spared on the condition that he left the country for good. He was stripped of his status as Freiherr and his civil rights were revoked. Following his forced departure from Sweden, he eventually settled in Denmark where he met the author and mother of Johan Ludvig Heiberg, Thomasine Christine Gyllembourg-Ehrensvärd whom he married.
Ehrensvärd joined the military at an early age. He received his first military training in the royal guard, working as a page for Louisa Ulrika of Prussia and eventually rose to the rank of first lieutenant in the artillery. This branch of the army contained some of the most dedicated opponents of Gustav III and his dissatisfaction with the king, which had started when he was employed as a page, increased.
In 1792 he had become involved in a plot to murder the king. His role in the plot, which was successful, first resulted in a death sentence but was later deemed too minor to justify a death sentence and was changed by the supreme court. Instead, his civil rights were revoked, effectively making him an outlaw, his title was revoked and he was expelled from Sweden for good.
Following his expulsion from Sweden he initially went to Germany, where he planned to seek employment with the French army but the revolution made this impossible and after a short time as a farmer in Holstein he decided to move to Denmark.
When Ehrensvärd decided to settle in Denmark he became friends with several authors who shared his liberal political views. Among these were Peter Andreas Heiberg, husband of Thomasine Christine Heiberg, born Buntzen. He also assumed his mother's maiden name Gyllembourg. In 1801 Buntzen divorced Heiberg and married Ehrensvärd, thus changing her last name to Gyllembourg-Ehrensvärd. The couple eventually settled in Copenhagen and Ehrensvärd continued to pursue his interest in politics and agriculture by writing books and papers. Among these were a paper consisting of remarks and suggestions for a Norwegian constitution. Norway had entered into a union with Sweden in 1814 and his paper was anonymously incorporated into the proceedings of the Norwegian rigsforsamling.