Miley Cyrus has an obsessed fan who traveled cross-country -- without invitation -- to see her in person, and left some bizarre Facebook posts that forced cops to take him into custody ... TMZ has learned.
The guy is from the Milwaukee area, and a couple of weeks ago he wrote several posts referencing taking a trip to see Miley. He claims he knows her address, how best to enter her home and says they'll "finally get together."
There's also a creepy thank you to Miley for "getting rid of Liam" ... and some rambling commentary about a "horrific act" he's going to pull off that will be on the news. The posts caught the attention of a concerned citizen, who alerted Milwaukee police.
According to law enforcement sources ... Milwaukee PD contacted LAPD and the L.A. Sheriff's Department to give them a heads up, and good thing they did. We're told the guy actually did make his way to Los Angeles -- cops located him on Monday, interviewed him and took him in for psychological evaluation. They can hold him for up to 72 hours.
It's unclear if Miley was aware of the apparent danger. We've reached out to her legal team.