Born in Heidelberg as the son of a tailor, he was trained as a saddlemaker. He became involved in politics as a trade unionist and Social Democrat, and soon became a leader of the "moderate" wing of the Social Democratic Party, becoming Secretary-General in 1905, and party chairman in 1913. In 1912 he was elected as a Member of the Reichstag (formerly Parliament of Germany) for the constituency of Elberfeld-Barmen (now part of Wuppertal).
In August 1914, Ebert led the party to vote almost unanimously in favour of war loans, accepting that war was a necessary patriotic, defensive measure, especially against the autocratic regime of the Czar in Russia. The party's stance, under the leadership of Ebert and other "moderates" like Philipp Scheidemann, in favour of the war with the aim of a compromise peace, eventually led to a split, with those radically opposed to the war leaving the SPD in early 1917 to form the USPD. For similar reasons several left-wing members of parliament had already distanced themselves from the party in 1916. Later they called themselves "Spartacists".
When it became clear that the war was lost, a new government was formed by Prince Maximilian of Baden which included Ebert and other members of the SPD in October 1918. Following the outbreak of the German Revolution, Prince Max resigned on 9 November, and handed his office over to Ebert. Prince Max also declared that the "Kaiser" had abdicated. Ebert favoured retaining the monarchy under a different ruler ("If the Kaiser does not abdicate, the social revolution is inevitable. But I do not want it, I even hate it like sin" he had said to Max von Baden on 7 November). On the same day, however, Scheidemann proclaimed the German Republic, in response to the unrest in Berlin and in order to counter a declaration of the "Free Socialist Republic" by Karl Liebknecht later that day. Ebert reproached him: "You have no right to proclaim the Republic!" By this he meant that the decision was to be made by an elected national assembly, even if that decision might be the restoration of the monarchy.
Scheidemann's proclamation ended the German monarchy, and an entirely Socialist provisional government based on workers' councils took power under Ebert's leadership.
Ebert led the new government for the next several months. He used the army under the command of Minister of Defence Gustav Noske and also Freikorps (paramilitary organisations of ex-soldiers) to suppress a Spartacist uprising against the establishment of a parliamentary democracy. Spartacist leaders Rosa Luxemburg and Karl Liebknecht were murdered by members of the Freikorps. When the Constituent Assembly met in Weimar in February 1919, Ebert was chosen to be the first President of the German Republic.
The German workers protected his government from the right-wing Kapp Putsch of some Freikorps in 1920 by means of a nationwide general strike. The armed forces "Reichswehr" remained neutral and did not defend the republic. Nevertheless the government used the army and parts of the Freikorps in order to suppress a communist-led rebellion in Germany's main industrial area, the Ruhr district in north-west Germany. Thousands of people were killed.
Participants in the Kapp Putsch were treated leniently. The judiciary in the Weimar Republic was "blind in the right eye". Some of the Freikorps already used the swastika as their symbol of resistance against the "red pack" at the time, and many of them as well as right-wing members of the Reichswehr would later become influential National Socialists.
Vicious attacks by Ebert's right-wing adversaries, including slander and ridicule, were often condoned or even supported by the judiciary when the president turned to the courts. The constant necessity to defend himself against those attacks also undermined his health. Ebert died on 28 February 1925, aged 54.