Sounds like that might be Ludwig II, King of Bavaria, often called The Mad King or Crazy Ludwig. Coming to the throne at the age of 18, He gradually withdrew from state affairs and squandered his fortune on, among other things, huge castles, such as Neuschwanstein, Linderhof, and Herrenchiemsee. He was also a close friend of the legendary composer Richard Wagner. He was eventually deposed at the age of 40, and was found dead the following day in what might or might not have been a suicide.