In May 1804, through Vogler's influence, Weber received an appointment as conductor at the theatre in Breslau (now Wrocław) in Silesia. Leaving Vienna on 28 May, he travelled via Salzburg for a final visit to Susan, and from there to Augsburg, where he collected his father. He assumed his duties in Breslau on 11 July 1804 at an annual salary of 600 thalers and made his first appearance as conductor on 1 August with a performance of La clemenza di Tito in German translation. During his two-year tenure at Breslau the idealistic young conductor worked hard to raise standards. He enlarged the orchestra and obtained higher salaries for its members, but also insisted on more stringent discipline at rehearsals and performances. He introduced a new orchestral seating arrangement, placing the first violins on the conductor's right and the second violins and violas on his left. His ambitious repertory included many operas by Mozart and other Viennese composers, operas by Peter Winter, a small number of works by Berlin composers, German translations of Italian works by Paer, Paisiello and Salieri, and a substantial number of opéras comiquesin German translation, the last reflecting his exposure to French opera in Vienna in 1803 and 1804 (Zduniak, L1987, Waidelich, L1994).
Given the demands of the position, it is hardly surprising that Weber composed relatively little at Breslau. The major work of the period was the unfinished fairy-tale opera Rübezahl, based on a libretto by the theatre director, J.G. Rhode. Nor is it surprising that the young conductor, still in his teens, encountered substantial opposition to his reforming efforts. Orchestral members allegedly resented the increased demands, critics were bothered by the new seating arrangement and by their perception of excessively fast tempos, and the management was troubled by the increased expenses and a repertory that did not always cater to the popular taste. According to Weber's son Max Maria, an accidental poisoning that left Weber bedridden for a prolonged convalescence allowed the theatre management to make changes in the orchestra that provoked him to resign. He closed his career in Breslau with a farewell concert on 21 June 1806.
Following his departure from Breslau, Weber spent the autumn and winter in Carlsruhe in Upper Silesia at the court of Duke Eugen Friedrich of Württemberg, who at Weber's request granted him the honorific title of ‘Musik-Intendant’. Temporarily freed from obligations, Weber composed a number of pieces for the small court orchestra and its musicians, including his two symphonies and the first version of the Concertino for horn. With letters of introduction from Duke Eugen and a portfolio of new music in hand, Weber left Carlsruhe on 23 February 1807 to undertake an extended tour to the west, giving concerts in Ansbach, Nuremberg, Erlangen and Bayreuth in the spring and early summer.
On 17 July 1807 Weber reached his ultimate destination, Stuttgart, the residence of Duke Eugen's brother Friedrich, King of Württemberg, and by 17 August Weber was appointed ‘Geheimer Sekretär’ to Duke Ludwig Friedrich Alexander, another brother of the king, with a salary of 400 gulden and responsibilities for administering the duke's affairs and the instruction of his children in writing and music. Little is known of Weber's day-to-day life during his 31 months in Stuttgart and Ludwigsburg, where Duke Ludwig maintained a residence. His circle included his father, who joined him in December 1807, the civil servant and librettist Franz Carl Hiemer, and the singer Margarethe (Gretchen) Lang, with whom he possibly had a romantic liaison. He also enjoyed contacts with men of letters like the editors of the Morgenblatt für gebildete Stände, J.C.F. Haug and Georg Reinbeck, and the royal librarian Lehr, who allegedly introduced him to the philosophical writings of Immanuel Kant, Christian von Wolff and Friedrich von Schelling. Such contacts renewed his interest in musical journalism and prompted him to start a quasi-autobiographical novel, Künstlerleben, of which an early segment was published in the Morgenblatt in 1809.
Most important of all, Weber's friendship with the composer Franz Danzi, Kapellmeister in Stuttgart since October 1807, kept him involved with art at a time when his official duties could easily have diverted him from a career in music. Thus, after composing relatively little in the second half of 1807, Weber produced a fairly steady stream of compositions during 1808 and 1809, including the melodrama-cantata Der erste Ton (j58), which he dedicated to Danzi. Presumably through Danzi's influence Weber also received commissions to write music for a production of Schiller's Turandot at the court theatre. The major work of the period was also intended for the theatre, the opera Silvana (composed between July 1808 and February 1810), for which Hiemer reworked the old Waldmädchen libretto.
The period in Stuttgart did not, however, come to a good end, largely through severe lapses in Weber's own judgment. Research by Joachim Veit has greatly clarified this dark episode in the composer's life (NZM, G1989). In 1808 Weber diverted about 50 friedrichs d'or from ducal funds to cover his and his father's personal debts. To repay this ‘borrowing’ Weber then compounded the problem by obtaining a loan from the innkeeper Hönes, who lent him 1000 gulden in the belief that Weber would procure for his son a nominal court appointment that would exempt him from military service (a scheme that Duke Ludwig himself used to finance his extravagant life style). Hönes's son was conscripted anyway and died in the war, and when Weber's repayments fell in arrears, Hönes lodged an official complaint against him, bringing to light the sale of military exemptions.
Weber and his father were arrested on 9 February 1810, charged with embezzlement, participation in a corrupt draft-evasion scheme and theft of royal silverware (an unfounded charge). The criminal trial was heard on 9–10 February by the king, who dismissed the criminal charges (probably in order to obtain Weber's silence about Duke Ludwig's corruption) and transferred the matter to the civil court, where Weber's creditors could make claims against his assets for his debts of about 2600 gulden. On 18 February Weber was placed under civil arrest at the expense of his creditors. Allowed to have visitors and writing materials, Weber finished Silvana during his confinement. After checking Weber's assets, the creditors petitioned on 22 February for his release, which the king ordered on 23 February along with a lifelong banishment from Württemberg. On 26 February Weber and his father were escorted to the Baden border, with only a small amount of money and letters of introduction from Danzi to various acquaintances in his old home town, Mannheim.