Matthew McConaughey got a restraining order against a woman he says has stalked and harassed him for over a year ... filing for protection before an in-person event he feared she'd attend.
According to the docs, obtained by TMZ, Matthew claims he's been subjected to harassment from the woman since April 2022 -- saying she has sent him "unhinged letters, emails, and frivolous lawsuits designed to lure me into court to contact me."
He claims she thinks she's in a relationship with Matthew and co-authored his books with him ... adding he's never contacted her and told his security to treat her kindly when talking to her, but wanted them to make it clear he doesn't want to talk.
He says things have escalated, claiming she bought a ticket to a recent photo op event for his children's book, "Just Because," in L.A., and planned to travel "over 300 miles" to meet him.
Matthew claims she also sent a "threatening email" to the bookstore ahead of the event, confirming her attendance.
Clearly, the judge agreed she was an issue ... granting the temporary order for Matthew.