At the end of 1914, Liebknecht,
together with Rosa Luxemburg, Leo Jogiches, Paul Levi, Ernest Meyer, Franz
Mehring and Clara Zetkin formed the so-called Spartacus League (Spartakusbund);
the league publicized its views in a newspaper titled Spartakusbriefe
("Spartacus Letters") which was soon declared illegal.
Liebknecht was arrested and sent to the eastern front during World War I
for the group's echoing of Russian Bolsheviks' arguments for a Proletarian
Revolution; refusing to fight, he served burying the dead, and due to his
rapidly deteriorating health was allowed to return to Germany in October
1915.
Liebknecht was arrested again following a demonstration against the war in
Berlin on 1 May 1916 that was organized by the Spartacus League, and
sentenced to two and a half years in jail for high treason, which was
later increased to four years and one month.
Liebknecht was released again in October 1918, when Max von Baden granted
an amnesty to all political prisoners. Following the outbreak of the
German Revolution, Liebknecht carried on his activities in the Spartacist
League; he resumed leadership of the group together with Rosa Luxemburg
and published its party organ, the Rote Fahne ("red flag").
On 9 November, Liebknecht declared the formation of a "Freie
Sozialistische Republik" (Free Socialist Republic) from a balcony of
the Berliner Stadtschloss, two hours after Philipp Scheidemann's
declaration of the "German Republic" from a balcony of the
Reichstag.
On 31 December 1918 / 1 January 1919, Liebknecht was involved in the
founding of the KPD. Together with Luxemburg, Leo Jogiches and Clara
Zetkin, Liebknecht was also instrumental in the January 1919 Spartacist
uprising in Berlin. Initially he and Luxemburg opposed the revolt, but
participated after it had begun. The uprising was brutally opposed by the
new German government under Friedrich Ebert with the help of the remnants
of the Imperial German Army and militias called the Freikorps; by 13
January, the uprising had been extinguished. Liebknecht and Rosa Luxemburg
were captured by Freikorps soldiers, on 15 January 1919, with considerable
support from Minister of Defense Gustav Noske, and brought to the Eden
Hotel in Berlin, where they were tortured and interrogated for several
hours. Following this, Luxemburg was beaten to death with rifle butts and
thrown into a nearby river while Liebknecht was shot in the back of the
head then deposited as an unknown body in a nearby mortuary.

Luxemburg was freed from prison in Breslau on November 8, 1918. One day
later Karl Liebknecht, who had also been freed from prison, proclaimed the
Freie Sozialistische Republik (Free Socialist Republic) in Berlin. He and
Luxemburg reorganised the Spartacus League and founded the Red Flag
newspaper, demanding amnesty for all political prisoners and the abolition
of capital punishment. On December 14, 1918, they published the new
programme of the Spartacist League.
From December 29 to 31 of 1918, they took part in a joint congress of the
Spartacist League, independent Socialists, and the International
Communists of Germany (IKD), that led to the foundation of the Communist
Party of Germany (KPD) under the leadership of Karl Liebknecht and
Luxemburg on January 1, 1919. She supported the new KPD's participation in
the national constitutional assembly that founded the Weimar Republic; but
she was out-voted.
In January 1919, a second revolutionary wave swept Berlin. Unlike
Liebknecht, Luxemburg rejected this violent attempt to seize power. But
the Red Flag encouraged the rebels to occupy the editorial offices of the
liberal press.
In response to the uprising, Social Democratic leader Friedrich Ebert
ordered the Freikorps to destroy the left-wing revolution. Luxemburg and
Liebknecht were captured in Berlin on January 15, 1919, by the Freikorps'
Garde-Kavallerie-Schützendivision. Its commander, Captain Waldemar Pabst,
along with Horst von Pflugk-Hartung questioned them and then gave the
order to execute them. Luxemburg was knocked down with a rifle butt, then
shot in the head; her body was flung into Berlin's Landwehr Canal. In the
Tiergarten Karl Liebknecht was shot and his body, without a name, brought
to a morgue. Likewise, hundreds of KPD members were summarily killed, and
the Workers' and Soldiers' councils disbanded; the German revolution was
ended. More than four months later, on June 1, 1919, Luxemburg's corpse
was found and identified.
One Freikorps soldier, Otto Runge (1875–1945), was imprisoned for two
years for her murder, though Pabst was not. The Nazis later compensated
Runge for having been jailed, and they merged the
Garde-Kavallerie-Schutzendivision into the SA. In an interview given to
the German news magazine "Der Spiegel" in 1962 and again in his
memoirs, Pabst maintained that two SPD leaders, defense minister Gustav
Noske and chancellor Friedrich Ebert, had approved of his actions. This
statement has never been confirmed, since neither parliament nor the
courts examined the case.
Luxemburg and Liebknecht were buried at Friedrichsfelde Central Cemetery
in Berlin, where socialists and communists commemorate them every January
15.