The Duchess of Sussex has said she found life within the British Royal Family so difficult that at times she "didn't want to be alive any more".
In a deeply personal TV interview, Meghan told Oprah Winfrey that she did not get help when she asked for it.
She said a low point was when Harry was asked by an unnamed family member "how dark" their son Archie's skin might be.
Prince Harry also revealed that his father, Prince Charles, stopped taking his calls when he wanted to step back.
The highly-anticipated interview with Oprah, which the couple were not paid for, aired overnight in the US.
During the two-hour CBS special, to be screened in the UK on ITV at 21:00 GMT on Monday night and on ITV Hub, Courtesy of Harpo Productions/CBS, the couple covered a range of topics, including racism, mental health, their relationship with the media and Royal Family dynamics.
In other key revelations:
The couple announced their second child, which is due in the summer, is a girl
They exchanged vows in a ceremony led by the Archbishop of Canterbury in their "backyard" three days before they were legally married at their public wedding in May 2018
Harry said his brother and father were "trapped within the system" of the Royal Family
He said his family cut him off financially at the beginning of last year
But Harry said he loved his brother "to bits" and wanted to heal his relationship with both him and his father
Meghan said she phoned the Queen after the Duke of Edinburgh went into hospital last month
The couple moved to California after formally stepping down from royal duties in March 2020, and it was announced last month that they would not be returning as working members of the Royal Family.
Meghan said that she started to feel lonely when limits were placed on what she could do, revealing that at one point she did not leave the house for months.
At one point she thought she "could not feel lonelier", she told Oprah.
Asked by Oprah if she was thinking of self-harm and having suicidal thoughts at some stage, the 39-year-old replied: "Yes. This was very, very clear. Very clear and very scary. I didn't know who to turn to in that."
Meghan said that she felt "haunted" by a photograph from an official event she attended with Harry at the Royal Albert Hall while she was pregnant.
"Right before we had to leave for that (event), I had just had that conversation with Harry that morning," Meghan said.
Winfrey asked: "That you don't want to be alive any more?"
"Yeah," Meghan confirmed.
She said that she attended the event with Harry that night because she felt she could not be "left alone" and recalled Harry gripping her hand tightly while in attendance at the Royal Albert Hall.
Oprah also asked the duchess why she thought the Royal Family did not make her son Archie a prince - which Meghan said she wanted so that he would get police protection.
The Duke and Duchess of Sussex's children do not automatically become princes or princesses because of a rule that has been in place since 1917 - unless the Queen steps in.
"In those months when I was pregnant, all around this same time so we have in tandem the conversation of he won't be given security, he's not going to be given a title, and also concerns and conversations about how dark his skin might be when he was born," Meghan said.
She said the remarks about skin colour were made to Harry and he relayed them to her.
Asked by Oprah whether there were concerns that her child would be "too brown" and that would be a problem, Meghan said: "If that is the assumption you are making, that is a pretty safe one."
When pressed, she refused to reveal who the individual was, saying: "I think that would be very damaging to them."
Harry also refused to give further details, saying: "That conversation, I am never going to share."
"At the time it was awkward, I was a bit shocked," he added.
The 36-year-old prince said that none of his relatives spoke out in support of Meghan following the racism he said his wife faced from the media.
"No-one from my family ever said anything over those three years. That hurts," Harry said.
2px presentational grey line
Analysis box by Jonny Dymond, royal correspondent
Meghan and Harry have upended the narrative created by Britain's bestselling newspapers.
They have revealed the terrible strains inside the palace. They have drawn a picture of unfeeling individuals lost in an uncaring institution. They have spoken of racism within the Royal Family. This was a devastating interview.
But Harry describing his brother and father as "trapped", and Meghan revealing that she repeatedly sought help within the palace only to be rebuffed, is a body blow to the institution.
It's not at all clear if and how the palace will respond. Many of the revelations are so personal that getting any reaction seems unlikely. The Queen has made clear repeatedly the affection in which the couple are still held.
As for the newspapers that the couple so despise - will they change their tune? It is not in their nature.
There were pages of bile in some Sunday newspapers prior to the interview. Meghan and Harry have given up on getting a fair hearing from many of the most popular publications. It seems highly unlikely that they will see anything published that will make them change their minds.
2px presentational grey line
During the interview, the Royal Family were also accused of failing to protect the duke and duchess, with Meghan saying the situation "started to really worsen" after the couple married in May 2018.
"I came to understand that not only was I not being protected but that they were willing to lie to protect other members of the family.
"But they weren't willing to tell the truth to protect me and my husband."
She was referencing rumours that she had made the Duchess of Cambridge cry during a disagreement about flower girl dresses - a story that prompted a flurry of tabloid stories.
Meghan said the opposite happened. She added that Catherine later apologised, bringing flowers and a note to make amends.
Joining his wife and Oprah for the second half of the interview, Harry talked about his relationship with the rest of his family.
He said his relationship with his grandmother, the Queen, was "really good" and that the two of them speak often.
However, his relationship with his father, the Prince of Wales, has suffered.
Harry said that he feels "really let down" by his father. He added that he will always love him, but "there's a lot of hurt that's happened".
He described his father and his brother as "trapped within the system" of the Royal Family.
"They don't get to leave," he added.
Of Prince William, he said they were on "different paths".
The interview aired while Harry's grandfather, Prince Philip, was recovering in hospital after a heart procedure - although it was recorded before Prince Philip was admitted.
When he went into hospital, Meghan said she phoned the Queen "just to check in".
She said the monarch had "always been wonderful to me" and recalled her sharing her blanket while travelling together between visits.
Harry also revealed that his family had cut him off financially at the beginning of last year, after the couple announced their intention to step back as senior royals.
He said deals with Netflix and Spotify were "never part of the plan" but they needed them to pay for security staff.