Metta World Peace claims he and his family have been targeted by a deranged woman who's threatened violence, attacked his property and waited for his kids after school ... and now, he's obtained a restraining order against her.
TMZ Sports has learned ... Peace went to the LAPD and told cops a "stranger," named Miesha Shakes, had been harassing him in a series of disturbing emails dating back to 2015.
Peace says the emails contained violent threats -- including one that read, "I apologize in advance, I'm going out with a bang. This will be the worst thing to ever happen in Westwood. Call cops I'm ready."
She also threatened to attack his car, accused him of raping women and threatened him with a knife ... Peace alleged in court documents.
Peace claims she made good on some of her threats -- throwing a brick through a window in his building and slashing his tires.
He also claims she physically attacked his 19-year-old daughter and "was waiting outside for my 13 yr old daughter after school."
Peace is clearly scared -- and asked the judge to keep her "1 million" yards away from his family, home, workplace, kids' school and "Earth."
The judge ultimately ordered the woman to stay 100 yards away from all of the requested places ... except Earth.
A hearing in the case is scheduled for later this month.