Though Ludwig had sided with Austria against Prussia in the Seven Weeks' War, his army was defeated. Peace conditions forced him to accepted a mutual defence treaty with Prussia in 1867. Under the terms of this treaty, Bavaria joined with Prussia against France in the Franco-Prussian War. On the request of the Prussian Minister President, Bismarck, Ludwig wrote a letter in December 1870 calling for King Wilhelm I of Prussia to be declared German Emperor or Kaiser at the creation of the German Empire. He received financial concessions in return for his support. Ludwig had little choice in the matter. The creation of the German Empire relegated Bavaria to a secondary position within the Empire. The days of Bavaria as an independent kingdom were over. Ludwig registered a protest on the changes by choosing not to attend the ceremony at Versailles Palace in France where Wilhlem I was declared German Emperor.
Throughout his reign, Ludwig had a succession of close friendships with men, including his chief equerry and Master of the Horse, Richard Hornig, Hungarian theatre actor Josef Kainz, and courtier Alfons Weber. In 1869, he began keeping a diary in which he recorded his private thoughts and his attempts to suppress his sexual desires and remain true to his Roman Catholic faith. Ludwig's original diaries were lost during World War II, and all that remains today are copies of entries made prior to the war. These copied diary entries, along with private letters and other surviving personal documents, suggest that Ludwig struggled with homosexuality throughout his life.
Due to the loss of Bavarian independence, Ludwig became increasingly withdrawn from the royal court and government. In the 1880s, Ludwig spent much of his time in seclusion in the Bavarian Alps, where he built several expensive fairytale castles with the assistance of stage designer Christian Jank. Neuschwanstein Castle was built high above the Pollat Gorge, near his childhood home, Hohenschwangau Castle, in tribute to the Nordic sagas of Lohengrin, Tristan and Isolde and Der Ring des Nibelungen (Ring of the Nibelungen) series. Neuschwanstein was never completed. Linderhof Castle, located in the Grswang valley, was built in the style of the time of King Louis XIV of France, and was the only one of his three castles that was completed. His other castle, Herrenchiemsee, was located on the Herren Island in Lake Chiemsee. It is a copy of the central section of Versailles Palace in France, and was never completed. With the reduction of his monarchy to that of a mere titular one within the new German Empire, Ludwig longed for the time of absolutism, when kings had real power.
Deposition and death
On June 10, 1886, Ludwig was officially declared incapable of executing his powers due to what the four reporting psychiatrists described as "paranoia", although no medical examination had taken place, and was deposed by the government. His father's younger brother Prince Luitpold was complicit in the action and was declared regent. The psychiatrist Professor Bernhard von Gudden headed the psychiatric team. Their chief "evidence" were stories of Ludwig's odd behaviour, collected from palace servants and his political enemies. The majority of these stories were hearsay and may have been obtained with bribery or threats, and their reliability is questionable. Most historians believe that Ludwig was indeed sane, an innocent victim of political intrigue. Others believe he may have suffered from the effects of chloroform used in an effort to control chronic toothache rather than any psychological disorder. Empress Elisabeth held that "The King was not mad; he was just an eccentric living in a world of dreams. They might have treated him more gently, and thus perhaps spared him so terrible an end."
Ludwig was taken into custody in secret after repeated attempts to detain him. The events proved as unusual as any in his life. An eccentric but loyal baroness arrived at the gates of Neuschwanstein castle to wave her umbrella menacingly and to harangue the first Commission of men who came to imprison Ludwig. The king himself ordered all kinds of punishments against his treasonous ministers. The most extreme punishments were never carried out. The commission was, however, locked up in the castle, and later released. A huge force of loyal citizens swarmed from the village below Neuschwanstein to protect their King. They were willing to escort Ludwig under guard across the border to save him, but Ludwig refused. The battalion of soldiers at nearby Kempten had been summoned to Neuschwanstein, but it was detained by the government.
Ludwig attempted to issue the following proclamation to the public:
The Prince Luitpold intends, against my will, to ascend to the Regency of my land, and my erstwhile ministry has, through false allegations regarding the state of my health, deceived my beloved people, and is preparing to commit acts of high treason. [...] I call upon every loyal Bavarian to rally around my loyal supporters to thwart the planned treason against the King and the fatherland.
This was printed by a Bamberg newspaper on June 11, 1886, but the copies were seized by the government fearful of the consequences of their distribution. Most of Ludwig's telegrams to the newspapers and his friends were intercepted. Ludwig received a message from Bismarck advising him to go to Munich and show himself to the people, but Ludwig felt unable to do so and therefore sealed his fate by refusing to leave Neuschwanstein and rally his people. On the morning of the twelfth, a second Commission reached the castle. The King was arrested at 4:00 am and taken to an awaiting carriage. He asked the person overseeing the operation, Dr. Gudden, "How can you declare me insane? After all, you have never seen or examined me before." Nevertheless, Ludwig was transported to Castle Berg on the shores of Lake Starnberg, south of Munich.