Timothy Sweet has been ordered to refrain from making any contact with the singer until 25 March, when a court hearing will take place to decide whether to extend the order.
In her request filed in Los Angeles Superior Court, Taylor said she had endured repeated harassment via phone messages, letters and social media.
One such message sent to her reportedly read, "My wife Taylor Swift (Sweet) and I love in Beverly Hills. I am in love with her. In conclusion, we treat each other with dignity and respect. I will carry a gun to protect her the rest of my life."
In another, he apparently threatens to kill anyone who "gets in the way" of the marriage he believes exists.
Taylor stated that his behaviour was "seriously alarming and harassing" and "extremely distressing to me and my family". The 24-year-old added that she does "not have any desire to interact with or communicate in any way with Mr Sweet."
He must now stay "100 yards away from her", her mother, her father and brother.