Short answer
The German monarchies ended in November 1918, at the close of World War I. Military defeat, economic hardship and a revolution that began among sailors and spread across the country left the emperor, Wilhelm II, and the other German rulers without the support they needed to stay on their thrones.
Defeat and loss of confidence
By the autumn of 1918, the German army had been pushed back and its leaders accepted that the war could not be won. Shortages and war weariness at home had built up over several years. There was also pressure from abroad, since the Allied powers were unlikely to negotiate with the emperor, and many Germans came to believe that his departure might make peace easier. How strongly each of these factors mattered is discussed by historians, but all of them contributed.
The November Revolution
In early November, sailors at Kiel refused orders, and unrest spread quickly to other cities. Workers’ and soldiers’ councils formed in many places. Rulers in the individual states found themselves facing the same pressure at almost the same time.
Abdications
On November 9, 1918, the imperial chancellor announced that Wilhelm II had abdicated, even though the emperor had not yet formally agreed to it. He left for the Netherlands soon afterward and signed a formal abdication later that month. Other rulers across the empire, including the kings of Bavaria, Saxony and Württemberg, left or renounced their thrones in the same weeks, followed by the grand dukes and princes. Many of these changes were fast and, for the most part, not violent.
The Weimar Republic
A republic was proclaimed, and the Weimar constitution of 1919 set up a new system with a president and an elected parliament. It also ended legal privileges of nobility, so that old titles became parts of names. The topic of today’s families is covered in whether Germany still has noble families.
Why monarchy did not come back
There were some monarchist groups after 1918, but the idea did not gain broad support. The emperor was widely blamed for the war’s outcome, the republic gained legitimacy, and later events, including the Nazi period, changed German politics in ways that left little room for a restoration. The postwar Basic Law is built on a republican system.
For the wider background, read our overview of German royal family history, or see when the last German royal ruled.