She says his "obsessive behavior" escalated in the summer of 2022, when she claims he twice showed up to her Los Angeles property and was given the boot.
Miley claims he was arrested in December 2022 and locked up at San Quentin State Prison until this past August, when she says he once again showed up at her front gate only days after getting out from behind bars.
In the docs, Miley claims the guy sent her a letter from prison stating his intention to come to her home, and he followed through ... but was stopped by her security, who contacted police. She says the cops told him to leave and he would be arrested if he came back.
Since the alleged incident, Miley claims she's learned the guy is using her address for his health insurance ... and she says he wrote a letter to her saying if she didn't write back he "doesn't give a f*** if he lives."
Miley says the guy's behavioral patterns show he's suffering from "severe mental health challenges" and she says he has a "dangerous fixation and/or obsession" with her ... and she's worried about her safety, and the lives of her mother, Tish, and boyfriend, musician Maxx Morando.
The judge agreed and granted Miley a temporary restraining order against the guy ... who is now barred from contacting her, harassing her or attending any of her public events or concerts. He also has to stay 100 yards away from Miley, her home, her car and any venues where she's performing.