The 19-year-old singer-actress initially sought a permanent restraining order to prevent the trespasser named Jason Luis Rivera from visiting her again, reported Ace Showbiz.
The man was actually sentenced to 18 months, but he is likely to be released in May 2013 due to jail overcrowding.
Jason climbed the fence of Cyrus's house and hid in the bushes. He had a pair of scissors and claimed that he was married to Cyrus while being apprehended by the cops.
He was charged with two misdemeanour counts of trespassing
and one misdemeanour count of resisting arrest.
"I am a friend of Miley Cyrus. I am. She's my wife. Me and Miley have been friends for five years," he told to the cops.
The 'Hannah Montana' star herself was not at home when the incident occurred.