In 1717, Bach eventually fell out of favor in Weimar and, according to a translation of the court secretary's report, was jailed for almost a month before being unfavorably dismissed: "On November 6, [1717], the quondam concertmaster and organist Bach was confined to the County Judge's place of detention for too stubbornly forcing the issue of his dismissal and finally on December 2 was freed from arrest with notice of his unfavourable discharge."
Leopold, Prince of Anhalt-Köthen, hired Bach to serve as his Kapellmeister (director of music) in 1717. Prince Leopold, himself a musician, appreciated Bach's talents, paid him well and gave him considerable latitude in composing and performing. The prince was a Calvinist and did not use elaborate music in his worship; accordingly, most of Bach's work from this period was secular, including the orchestral suites, cello suites, sonatas and partitas for solo violin, and Brandenburg Concertos.