Charles VII was the prince-elector of Bavaria from 1726 and Holy Roman Emperor from 24 January 1742 until his death in 1745. A member of the House of Wittelsbach, Charles was the first person not born of the House of Habsburg to become emperor in over three centuries, though he was connected to that house both by blood and by marriage.
In 1726, when his father died, Charles Albert became Duke of Bavaria and a Prince-elector of the Holy Roman Empire. He maintained good relations both with his Habsburg relatives and with France, continuing his father's policies. In 1729 he instituted the knightly Order of St George. That year, he also started building the Rothenberg Fortress.
In continuance of the policy of his father, Charles Albert aspired to an even higher rank. As son-in-law of Joseph I, Holy Roman Emperor, Charles Albert rejected the Pragmatic Sanction of 1713 and claimed the German territories of the Habsburg dynasty after the death of emperor Charles VI in 1740. With the treaty of Nymphenburg concluded in July 1741, Charles Albert allied with France and Spain against Austria.
During the War of the Austrian Succession Charles Albert invaded Upper Austria in 1741 and planned to conquer Vienna, but his allied French troops under the Duc de Belle-Isle were redirected to Bohemia instead and Prague was conquered in November 1741. So Charles Albert was crowned King of Bohemia in Prague (19 December 1741) when the Habsburgs were not yet defeated. He was unanimously elected "King of the Romans" on 24 January 1742, also with the vote of George II, and became Holy Roman Emperor upon his coronation on 12 February 1742. His brother Klemens August of Bavaria, archbishop and elector (Kurfürst) of Cologne, who generally sided with the Austria Habsburg-Lorraine faction in the disputes over the Habsburg succession, cast his vote for him and personally crowned him emperor at Frankfurt. Charles VII was the second Wittelsbach Emperor after Louis IV and the first Wittelsbach King of the Romans since the reign of Rupert of Germany.
Suffering severely from gout, Charles died at Nymphenburg Palace in January 1745. His brother Klemens August then again leaned towards Austria, and his son and successor Maximilian III Joseph made peace with Austria. With the Treaty of Füssen Austria recognized the legitimacy of Charles VII's election as Holy Roman Emperor.
Charles Albert is buried in the crypt of the Theatinerkirche in Munich.