Malawi's President Peter Mutharika has approved a law which lifts the age for marriage from 16 to 18.
Human rights activists had pushed for the law, saying Malawi had one of the highest rates of child marriage in the world.
Parliament passed the law two months ago, despite strong opposition from traditionalists.
The law only recognises marriages between men and women, disappointing gay rights activists.
Homosexual acts are illegal in Malawi, where most people hold deeply conservative religious and cultural beliefs.
The BBC's Raphael Tenthani reports from the main city Blantyre that Mr Mutharika's decision to approve the law is a victory for feminists.
It covers a wide range of issues, including giving a widow a share in her husband's property, ruling out the need for a will, he says.
The law also states that if an underage couple have a child, the boy's family will be financially responsible for the baby until the couple are able to support themselves and the child.
Local and foreign non-governmental organisations had campaigned for the ban on child marriage, saying it "traps girls, their families and communities into a cycle of inter-generational poverty", AFP news agency reports.
Rights campaigner Milliam Chilemba welcomed the ban.
"Once they reach puberty, parents consider their girls as adults ready for marriage."
"Many parents cannot afford to pay [school] fees for their girls and they opt to marry off their children to relieve themselves of the burden," she told AFP.
Half of Malawi's population of about 15 million live below the poverty line.
- 2 July
- 11 January 2015
- 4 October 2011