The Duchess of Sussex was changing baby Archie’s nappy at their former home in Los Angeles when she “felt a sharp cramp”.
The tragedy took place in July on a morning that “began as ordinarily as any other day”.
In a personal piece called The Losses We Share, Meghan wrote in the New York Times: “After changing his diaper, I felt a sharp cramp.
“I dropped to the floor with him in my arms, humming a lullaby to keep us both calm, the cheerful tune a stark contrast to my sense that something was not right.
“I knew, as I clutched my firstborn child, that I was losing my second.”
She added: "Hours later, I lay in a hospital bed, holding my husband’s hand. I felt the clamminess of his palm and kissed his knuckles, wet from both our tears.
"Staring at the cold white walls, my eyes glazed over. I tried to imagine how we’d heal."
Meghan said she tried to keep a “brave face” in public and referenced an older interview with ITV journalist Tom Bradby.
He asked how she was doing and Meghan responded: “Thank you for asking. Not many people have asked if I’m OK.”
She writes: "I answered him honestly, not knowing that what I said would resonate with so many — new moms and older ones, and anyone who had, in their own way, been silently suffering.
“My off-the-cuff reply seemed to give people permission to speak their truth. But it wasn’t responding honestly that helped me most, it was the question itself.”
Meghan said she has shared her own pain to "take the first steps towards healing".
She added: "Losing a child means carrying an almost unbearable grief, experienced by many but talked about by few.
"In the pain of our loss, my husband and I discovered that in a room of 100 women, 10 to 20 of them will have suffered from miscarriage.
"Yet despite the staggering commonality of this pain, the conversation remains taboo, riddled with (unwarranted) shame, and perpetuating a cycle of solitary mourning."