Despite the apparent danger, the situation in East Prussia was actually not serious. The Russian advance was badly coordinated and led, and when the new command team arrived in East Prussia on 23 August, they were able simply to confirm the plans that their subordinates had already put in place. These plans led to the German victories at Tannenberg (26-31 August 1914), and the Masurian Lakes (5-15 September 1914), which removed any Russian threat to East Prussia, and did almost irreparable to the Russian army, while also confirming Ludendorff in his belief that the destruction of the enemies troops was more important than the capture of land. However, Austrian defeats in Russian Poland prevented the Germans from taking any advantage from their victory, and Ludendorff and Hindenburg were forced to move to the aid of their ally. When they were able to return to the offensive in 1915, the Russians were thrown back deep into their own territory, further raising the stock of Hindenburg and Ludendorff.
It was therefore not a surprise when, after the fall of Falkenhayn as Chief of Staff due to heavy losses at the Somme and Verdun, he was replaced by Hindenburg, with Ludendorff as his Quartermaster General, in charge of organisation and supply, at least initially (29 August 1916). The duo soon came to dominate Germany politically as well as militarily. In September 1916, they forced the Austrians to accept a joint command, in effect putting them in charge of the entire Central Powers war effort. Their plan for 1917 was to stay on the defensive in the west, while preparing for a war winning effort in 1918. Ludendorff was in command of this preparation. On the western front it took two aspects. First, a new defensive line, the Siegfried or Hindenburg line, was constructed, behind the then frontline. When the German troops retreated to the new line, they devastated the countryside as they passed. While abandoning some 1000 miles of captured French territory, the new line shortened the German frontline by 30 miles, and freed 10 divisions and 50 artillery batteries for the planned attacks. Second, the army was retrained on the Stormtrooper lines developed by Captain Willy Rohr. Stormtrooper tactics were to advance behind a creeping artillery barrage, bypassing strongpoints for other units to deal with, advancing until exhausted, then being leapfrogged by fresh troops, never allowing the enemy to regain their footing, an early version of Blitzkrieg. He also reorganised the war effort in Germany, making it more total, and increasing production. Finally, he was a strong advocate of unrestricted Submarine warfare, which was unleashed in 1917, and which rapidly caused the entry of the United States into the war, which helped doom the German cause.
The long prepared for attacks came early in 1918. Bolstered by troops freed by the end of the war with Russia, Ludendorff, in command of the attacks, was able to achieve numerical superiority on the western front for the first time since 1914. His plan was to launch a series of attacks that would draw the allied reserves slowly south, until the B.E.F. was isolated, then launch an attack in Flanders that would knock the British out of the war, and force a French surrender, before American troops, who were already starting to appear in increasing numbers, could enter the fray. The first attack was launched on 21 March 1918, and the new tactics had a startling success. The BEF was forced back forty miles in only two days, but the line held, and Ludendorff moved on to launch a series of initially equally successful attacks further south. However, the allies were now better organised than at any other point in the war, and they managed to hold the line, helped by American troops, who were freed to enter the line. The final attack came to an end on 19 July, and the attack in Flanders never happened. The Ludendorff offensives had cost the German army dear, and it was never again to take the offensive. While the last German attack was failing, the French launched the first of a series of counterattacks that were to lead to victory, followed in August by a successful British, Canadian and Australian attack, that on 8 August, called the 'Black day' of the German army by Ludendorff, forced the German army back six to eight miles. As the Central Powers started to collapse, Ludendorff realised that the war was lost, and on 28 September, the day after Bulgaria sued for Peace, called for a cease-fire. However, he soon regained his confidence, and felt that the German army could fight on for several months to gain a better peace. When American demanded unconditional surrender, Ludendorff refused, and on 26 October resigned under pressure from the Kaiser.
At the end of the war, he left Germany, and spent a year in Sweden, before returning to Germany, where, forgetting his own calls for surrender, he helped foster the myth of the 'stab in the back', which took the blame for the defeat away from the German army. He was a strong advocate of a war of revenge against France and Britain, and an early supporter of Adolf Hitler. He played a part in Hitler's failed Bear Hall Putsch (9 November 1923), the failure of which disillusioned him to a certain extent with Hitler, but he remained a Nazi, and served in the Reichstag from 1924 to 1928, although remained estranged from Hitler. He died in 1937. The Nazi elite, including Hitler, attended the funeral.