"We are shocked and in the kind of deep pain you only hear about, the kind of pain we've never felt before," she wrote in a moving Instagram statement.
Her post was accompanied by several black and white photos, including one of her crying in her hospital bed.
Model Teigen and singer Legend have two children, and in mid-August revealed they were expecting a third.
In her latest post, Teigen revealed the Los Angeles-based couple had been planning to call the baby Jack.
"We never decide on our babies' names until the last possible moment after they're born, just before we leave the hospital," she wrote.
"But we, for some reason, had started to call this little guy in my belly Jack. Jack worked so hard to be a part of our little family, and he will be, forever.
"I'm so sorry that the first few moments of your life were met with so many complications, that we couldn't give you the home you needed to survive. We will always love you."
Retweeting her, Legend added "We love you, Jack" alongside five black love hearts.
Teigen later added: "Driving home from the hospital with no baby. How can this be real."
Teigen, who is also a TV presenter, had been documenting her pregnancy on social media. She was taken to hospital on Sunday due to excessive bleeding but had reassured fans she and the baby were healthy.
In her latest post, however, she revealed that "we were never able to stop the bleeding and give our baby the fluids he needed".
Teigen thanked her followers for their "positive energy, thoughts and prayers" and expressed gratitude for the "amazing" life she enjoyed with her family.
"But everyday can't be full of sunshine," she continued. "On this darkest of days, we will grieve, we will cry our eyes out. But we will hug and love each other harder and get through it."
Legend, 41, is a multiple Grammy-winning artist whose 2013 track All of Me - a song he dedicated to his wife - spent 92 weeks in the UK singles chart.
His parallel careers in film, music and TV work have seen him become an EGOT - one of only 16 people who've won a competitive Emmy, Grammy, Oscar and Tony award.