Court documents cited by the entertainment website said the man, named as Sergie Mifle, made Lively "afraid for [her] safety."
Mifle apparently claimed he had a "metaphysical or spiritual" connection with the 24-year-old actress and had come to the set to "help [her] heal."
The documents also showed that he attempted to phone or email Lively's mother.
The restraining order means Mifle must stay at least 100 yards (meters) away from Lively, her mother and the "Gossip Girl" set.
Lively, who was born in Los Angeles, is currently dating actor Ryan Reynolds.