The prime minister's wife, 33, announced the news on Instagram, saying she was hoping for a "rainbow baby" this Christmas. She wrote that, while she felt "blessed to be pregnant again", she had also "felt like a bag of nerves".
Mrs Johnson gave birth to the couple's son Wilfred in April 2020.
The term "rainbow baby" is used for a child born after a miscarriage, stillbirth or neonatal death.
In a post on Instagram, Mrs Johnson wrote: "At the beginning of the year, I had a miscarriage which left me heartbroken.
"I feel incredibly blessed to be pregnant again but I've also felt like a bag of nerves.
"Fertility issues can be really hard for many people, particularly when on platforms like Instagram it can look like everything is only ever going well.
"I found it a real comfort to hear from people who had also experienced loss so I hope that in some very small way sharing this might help others too."
Alongside the post she shared a picture of a blue buggy Christmas decoration.
Labour leader Sir Keir Starmer congratulated the couple on Twitter and also said he was sorry to hear of Mrs Johnson's earlier miscarriage, adding that he was sure her speaking out would comfort others.
"Every best wish to both of them," he said.
The couple married at a small wedding ceremony at Westminster Cathedral in May this year - making Mr Johnson the first prime minister to marry while in office for nearly 200 years.
It was Mr Johnson's third marriage, with the prime minister having previously been married to Marina Wheeler with whom he had four children.
He did not have any children with his first wife Allegra Mostyn-Owen.
In recent years, several children have been born to prime ministers while in office.
Tony Blair and his wife, Cherie, welcomed their fourth child Leo in 2000, three years after the Labour leader's landslide victory.
A baby daughter, Florence, was born to David Cameron and his wife Samantha in 2010.