Answer
Schlegel moved to Austria in 1809 to work as a diplomat. He had been working as a professor at the University of Jena since 1798, but he was forced to leave the university when it was closed down by the French in 1806. He then moved to Vienna, where he was appointed as a diplomat by the Austrian government.