The statement, which confirms the pair's relationship for the first time, said that "the past week has seen a line crossed," and accused the press and social media trolls of sexist and racial abuse.
"His girlfriend Meghan Markle has been subject to a wave of abuse and harassment. Some of this has been very public -- the smear on the front page of a national newspaper; the racial undertones of comment pieces; and the outright sexism and racism of social media trolls and web article comments," read the statement, which was issued by Prince Harry's communications secretary through the palace Twitter account.
"Some of it has been hidden from the public -- the nightly legal battles to keep defamatory stories out of the papers; her mother having to struggle past photographers to get to her front door."
The warning put an end to weeks of media speculation over whether the two were in a relationship.
The palace statement said Markle, who lives in Toronto where her TV series "Suits" is filmed, has had photographers try to break into her home and that her ex-boyfriend had been offered "substantial bribes" by various newspapers.
"Prince Harry is worried about Ms. Markle's safety and is deeply disappointed that he has not been able to protect her," the statement read.
The prince, 32, asked for his statement to be issued so that the press behind the story could "pause and reflect before any further damage is done."
A royal obsession?
The British media -- which regularly covers the personal lives of the royal family -- has reported heavily on the relationship
, in particular Markle's heritage. Her mother is African American and her father is Caucasian.
The Daily Mail headlined a story "Harry's girl is (almost) straight outta Compton," in which it reported that Markle's mother lives in a "run-down area" in Crenshaw, Los Angeles.
The Sun described Markle as a "brunette" and a "break from the mould for Prince Harry, who has previously dated a string of blondes."
The palace rarely puts out such statements, but did release a similar one in 2015
to ward off paparazzi taking photos of Prince George and Princess Charlotte, the children of the Duke and Duchess of Cambridge, Prince William and Kate Middleton.
A rare appeal
The warning has resonated among Britons as the prince was only 12 when his mother, Princess Diana, was killed in a car crash as paparazzi chased and photographed her.
"This is very much part of William and Harry's life as it is ... They remember vividly what happened to her, and that is what's behind the statement," said royal commentator Richard Fitzwilliams, the former editor of Who's Who directory of influential people.
He said there had been very few occasions where the royal family had been so explicit in telling the media to back off.
"There have been other appeals, but there haven't been appeals quite like this one, especially with the racist aspect to it and the angle of harassment," he added.