Beyonce Opens Up About Miscarriage

Credit: Jason Merritt/Getty Images.

In Beyonce's new HBO documentary, "Life Is But a Dream," the singer opens up for the first time about the miscarriage she suffered before giving birth to her daughter, Blue Ivy.

"About two years ago, I was pregnant for the first time. And I hear the heartbeat, which was the most beautiful music I ever heard in my life," she says in the documentary, according to People magazine.

This is the first time the 31-year-old singer has spoken out about her miscarriage. ( Jay-Z first revealed that Beyonce had a miscarriage in the song he recorded immediately after Blue Ivy's January 2012 birth, "Glory Featuring B.I.C.")

RELATED: Jay-Z Records Song About Blue Ivy

In the documentary, Beyonce says she "envisioned what my child would look like" and that being pregnant was like falling in love.

"You are so open. You are so overjoyed," she says. "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."

RELATED: Beyonce Drops Hints About Super Bowl Halftime Show

But in the early stages of her pregnancy, Beyonce "flew back to New York to get my check up - and no heartbeat," she says. "Literally the week before I went to the doctor, everything was fine, but there was no heartbeat."

To cope with the loss, Beyonce "wrote the saddest song I've ever written in my life," which ended up being the first song she wrote for her new album.

In the documentary, Beyonce also puts to rest the rumor that she used a surrogate to birth Blue Ivy, saying it was "the most ridiculous rumor I've ever had about me."

RELATED: Beyonce Admits to Singing With Pre-Recorded Track at Inauguration

More ABC News