In 1779 he entered the public service in the department of the censorship of books. The Elector Charles Theodore, who had at first favored him, became offended on discovering that Montgelas was associated with the Illuminati, a secret society in Bavaria that held the most anti-clerical propositions of the Enlightenment. Montgelas therefore went to Zweibrücken, where he was helped by his brother Illuminati to find employment at the Court of the Duke, the head of a branch of the Wittelsbach family. From this refuge also he was driven by orthodox enemies of the Illuminati.