As early as August, 1918, senior German commanders suspected that their forces would collapse in the face of a sustained Allied offensive. To avoid a humiliating capitulation, they tried to stiffen their defense in the field while hoping to persuade the Allies that a negotiated armistice—that is, an armistice in which both sides made concessions—would be in their best interest. The disorderly retreat of the demoralized German soldiers and the success of the Allied offensives in August and September made an immediate negotiated armistice impossible.

On September 29, Ludendorff informed the government that military resistance had collapsed and that the only way to avoid the invasion and occupation of Germany was to sue for peace. A new parliamentary government was established and vested with much of the authority over domestic and foreign affairs that had been assumed by the military. Prince Max of Baden, a royalist liberal, was selected chancellor and foreign minister.

On October 5, Prince Max sent a note to President Wilson stating that Germany was prepared to begin armistice negotiations based on the Fourteen Points. Wilson did not inform his European allies of this note because he hoped to act as a mediator between them and Germany.

Wilson's view changed, however, after some 520 civilians were killed when a German U-boat sank the Leinster, a British mail ship. He was so infuriated that he informed the Germans that he was no longer willing to seek a negotiated armistice, and that he would allow the Allied military commanders to end the war on their terms. Wilson, believing that the kaiser could not be trusted to abide by the terms of an armistice, also informed Prince Max that the Allies would not conclude any type of armistice as long as the kaiser ruled Germany.

On October 20, Prince Max ordered an end to the submarine campaign, but it was too late to revive hopes for a negotiated armistice. Meanwhile, the European Allies were angered when they discovered that Wilson had not informed them of Prince Max's note.

Ludendorff resigned on October 27. A naval mutiny at Kiel spread to other north German cities early in November. Revolution broke out in Munich on November 7. Germany was on the brink of complete disaster. There was no alternative; the government asked for an armistice.

On November 8 a German armistice commission was received by Marshal Foch in his private railway coach, which served as his headquarters, at Compiègne. When the German military leaders were informed of the terms of the armistice, they argued that death in battle was preferable to humiliation at the peace table. However, on November 10, Kaiser William abdicated and fled to the Netherlands, and a new civilian government announced its acceptance of the Allied terms. The German representatives signed the agreement at 5:00 A.M., November 11, and hostilities ceased at 11:00 A.M.

Under the armistice, Germany surrendered 160 submarines, and its surface fleet was interned. Thousands of airplanes, heavy guns, and machine guns, and great quantities of other equipment, were surrendered to the Allies. The Germans agreed to vacate all occupied territory within 15 days. The treaties of Bucharest (Romania's surrender) and Brest-Litovsk (Russia's surrender) were renounced. All Germany west of the Rhine was occupied by the Allies, together with bridgeheads on the east bank at Mainz, Coblenz, and Cologne. Germany was to pay an indemnity, the amount of which was to be determined later.

The Armistice remained in effect until peace treaties were signed. The United States signed none of these treaties, but officially ended the war by a joint resolution of Congress on July 2, 1921. The United States then signed separate treaties with Austria (November 8, 1921). Germany (November 11), and Hungary (December 17).