Cops say Musa Danasabe Ibrahim told a neighbor that he had a date with with the Hannah Montana star when he was caught snooping on a neighbor's lawn by LAPD officers.
The 26-year-old had apparently mistaken the home for 19-year-old star's next door.
"Ibrahim was trying to make entry into Miley Cyrus' house, but he got the houses mixed up," a spokesperson told X17online.
"When we arrived on scene, we found him in her neighbor's yard. He was arrested for trespassing."
A close pal of the star revealed: "The whole thing has shaken Miley a little but she's a strong girl and I'm sure she'll get over it quickly.
"She's known for a while that there can be some bad things about being famous, but this has brought that into sharp focus."
They added: "Luckily she wasn't there at the time, but her management will be reviewing her security as a precaution."
Ibrahim's bail has been set at $5,000.