The actress filed the order after a man named Yasin Ajani was arrested outside of her Los Angeles home on Monday (July 16).
According to court documents obtained by TMZ, Ajani attempted to enter Miller and Rogen's home by telling the couple's maid that he was a friend delivering a package.
However the maid refused to allow Ajani in, prompting him to jump over the couple's fence and wait on a sofa in their front yard.
The 31-year-old was later arrested for criminal trespass, and told police that "voices" had told him to seek Miller out.
Miller added in the court papers that she is "fearful that Ajani will continue to stalk me and come to my residence to seek me out… I cannot sleep at night and constantly check through the windows and the surveillance system for Ajani."
Ajani has been placed on a 72-hour hold for mental health evaluation. A hearing in the case has been scheduled for Friday, August 10.