The actress claimed that she has been living in "constant fear" of John C. Luna who she said has been harassing her since 2008 and turned up at her Los Angeles home in May.
Mendes told a judge in court that Luna has sent her "creepy" letters, cards and nine hours of "bizarre" audio messages.
In her legal papers, she stated: "As a result of Mr Luna's conduct directed at me... including references in a letter that he knows I am willing to die for him, and his showing up at my house on May 31, 2011, looking for me, I am in constant fear."
She also added: "I do not personally know, nor have any relationship with Mr Luna, have never had any personal communications with him, nor do I desire any interaction or communication with him whatsoever."
A judge has now ordered that Luna must stay at least 100 yards away from the 37-year-old and must not make any attempts to contact her.
Mendes also wants him to pay her $8,550 (£5,219) of legal bills. A further hearing has been set for June 20.
Mendes recently revealed that she isn't ready to start a family and has previously described marriage as unnecessary.