Beyonce has opened up about the miscarriage she went through before giving birth to her daughter with husband Jay-Z, Blue Ivy.

Jay-Z was actually the one who revealed that his wife had experienced a miscarriage on his song “Glory,” about the birth of their first child.

But in her HBO documentary Life is But a Dream, Beyonce opened up about it.

“About two years ago, I was pregnant for the first time," she explained, E! Online reports. "And I heard the heartbeat, which was the most beautiful music I ever heard in my life."

She also explained in the sneak peek of the documentary, which airs next month, "I picked out names. I envisioned what my child would look like...I was feeling very maternal," before revealing that she found out about the miscarriage during a routine doctor’s check-up.

"I flew back to New York to get my checkup—and no heartbeat. Literally the week before I went to the doctor, everything was fine, but there was no heartbeat,” she said.

"I went into the studio and wrote the saddest song I've ever written in my life. And it was actually the first song I wrote for my album," she said. "And it was the best form of therapy for me, because it was the saddest thing I've ever been through."

Daily Mail reports that she also talked about being pregnant with Blue, saying “Being pregnant was very much like falling in love. You are so open. You are so overjoyed. There's no words that can express having a baby growing inside of you, so of course you want to scream it out and tell everyone.”

image: INF Daily