"The petitioner is a professional performer and I guarded myself against the danger of her merely reciting a well-rehearsed speech by asking her some rather uncomfortable questions to which she gave very candid answers," Mwale said in her ruling.
"There is no doubt that the petitioner can offer the infants not only the best education money can buy, but also guidance with a high likelihood of ensuring that the two infants grow to be self-sufficient adults," the judge said.
Mwale said she didn't challenge Madonna, 58, on Malawi's residency requirements for adoption, saying the country's Supreme Court of Appeal had addressed the issue in the pop star's previous adoption.
"In determining her motives, I questioned the petitioner at length about the impact of her decision which could be construed as robbing Malawi of its most precious resource, its children," the judge wrote.
Madonna said the children will keep their birth names as part of an effort to preserve their identity as Malawians, and a Malawian carer will travel with the children to the United States to ease their transition, according to the ruling.
The twins were delivered by Caesarean section and the mother died within a week because of complications from the birth, the court document said. The children have five older siblings and the father, who was at the Jan. 25 court hearing attended by Madonna, had remarried and was unable to provide for all his dependents, it said.
In 2006, Madonna founded the charity Raising Malawi to address the poverty and hardship endured by the country's orphans and vulnerable children.
In 2013, Malawi accused Madonna of exaggerating her contributions to the impoverished country and unreasonably demanding special treatment during a tour there. The pop star denied the accusations. On a visit to Malawi in late 2014, she met newly elected President Peter Mutharika as well as the father of her adopted, Malawi-born son.
Mwale noted that the pop star has raised $7.5 million for her latest project in Malawi, the construction of a pediatric surgery ward at Queen Elizabeth Central Hospital in Blantyre. The ward is scheduled to open early next year.