Suella Braverman, the government's chief law officer, announced in November she was expecting her second child "early next year".
She would be one of the most senior government ministers to give birth in office.
Under current laws, she would have to resign if she wanted to take time off following the birth.
The government has announced a new law to formalise the process for ministerial maternity leave, which until now has been at the discretion of the prime minister.
The Ministerial and other Maternity Allowances Bill will allow cabinet ministers to receive up to six months' leave on full pay.
At the moment, legislation from the 1970s means the prime minister does not normally have the flexibility to pay a cabinet minister maternity leave alongside paying a salary to their temporary replacement.
The bill would allow Ms Braverman and other cabinet ministers to take six months' leave on full pay - similar to more junior government roles and the civil service.
Several female politicians serving as junior ministers have taken maternity leave in the past, including Conservative MPs Tracey Crouch and Kemi Badenoch.
Labour leader Sir Keir Starmer said his party would back the bill, adding the change "should have been brought in a long time ago".
The party's shadow cabinet office minister, Rachel Reeves, said the measures were a "small but significant step forward" but the government needed to go further and make provision for paternity, adoption and shared parental leave.
Introducing the new measures in a written statement, the prime minister said: "The choice between taking leave to recover from childbirth and care for a new-born child or resigning from office is not acceptable in modern times."
Boris Johnson acknowledged that provisions needed to be made for leave for adoption, sickness and other circumstances.
Ministers aren't subject to normal employee rights because they're appointed, and fired, by the prime minister.
Many will be surprised to learn that Suella Braverman will become the first cabinet minister to take paid maternity leave.
It's a generous scheme which will grant six months of full pay - under current rules, she would have had to resign or be demoted to qualify.
The bill is being rushed through Parliament because she's due to give birth soon, but Labour wants to revisit the issue later to include paternity leave.
The years of muddling through on an informal basis will end next Thursday.
Ms Braverman, the Conservative MP for Fareham, became the second-ever woman to be appointed attorney general for England and Wales in February 2020.
She had previously served as a junior Brexit minister under Theresa May, before resigning in November 2018 in protest at the former PM's Brexit plans.
She went on to take maternity leave whilst serving as a backbench MP after the birth of her first child in July 2019, with a "proxy MP" taking part in parliamentary debates and votes on her behalf.
* Conservative MP Tracey Crouch was the first Conservative minister to take maternity leave in 2016. She said she had been unsure about accepting the job of sports minister because she wanted to start family
* Chloe Smith interrupted her maternity leave in 2017 to take part in a vote - becoming the first Conservative MP to bring their baby in to the Commons chamber
* In 2019, Labour MP Tulip Siddiq went against the advice of her doctors and delayed a planned caesarean section so she could take part in a crucial Brexit vote
* Labour's Stella Creasy was given permission to appoint a "locum MP" to cover her maternity leave in 2019
* Father-of-three Conservative MP Bim Afolami was the first dad able to vote by proxy when he took paternity leave
Responding to the change, Ms Creasy said: "In no other workplace would guaranteed paid maternity leave and cover be only the preserve of the management.
"The introduction of cover for ministers is long overdue, and this legislation reveals the lie I was told when I asked for maternity cover that MPs employment status made it impossible."
Ms Creasy added: "What message does it send to the thousands of pregnant women facing redundancy and job insecurity in the pandemic or any of those considering entering public life at any level, if parliament treats maternity leave as a bonus like a company car to be given only to those at the top?"
* Women are entitled to up to 52 weeks' maternity leave
* They must take at least two weeks' leave after the baby is born (or four weeks if they work in a factory)
* They are eligible to be paid for six weeks at 90% of their average weekly earnings and 33 weeks at £149 per week or 90% of their average weekly earnings (if lower)
* Fathers can take two weeks' statutory paternity leave at £149 a week
* Some couples are also entitled to shared parental leave of up to 50 weeks and 37 weeks of pay
You’ll never be old and wise if you weren’t young and crazy.