Trent Reznor's neighbor has a dangerous hatred of him and has been harassing him and his family for months ... according to new legal docs.
The Nine Inch Nails founder filed paperwork to keep his neighbor Nader Afshar away, claiming the man recently expressed his hatred of Reznor to a friend who was leaving Trent's house ... and yelled at him that "Satan" was going to get Trent.
Reznor claims Afshar behaves irrationally and has been increasingly threatening to him and his family over the past 6 months, and he's had to get police involved.
On Christmas Eve -- according to the docs -- Trent says he was outside playing with his kids when he spotted Afshar "disheveled" wearing an open shirt, shorts and Santa hat ... walking up and down the sidewalk ranting, "rich people can do anything they want, but the Lord will get them in the end."
Trent asked a judge to to keep his neighbor at least 10 yards away from him, his family and employees while they're working at his residence ... the judge agreed.
A court hearing on the matter's set for next month.