Madonna has accepted an undisclosed amount in damages for a "serious invasion of privacy" from the publishers of MailOnline.
On Thursday, the Associated Newspapers group agreed to pay the pop star's legal costs, plus damages, for "threatening the integrity" of the singer's two adopted daughters.
Madonna sued the group over a story published by MailOnline in January, which gave details of her adoption of two four-year-old twins in Malawi before the process was concluded.
"Under Malawian law and equivalent provisions under English law, there are rules around identifying children who are in the process of being adopted, principally for their own security and welfare," Madonna's lawyer said.
The article revealed the girls' names, race, age, the fact they lived in an orphanage in Malawi and the fact they were the subject of pending applications for adoption by Madonna.
The popstar's lawyer told a London judge that the story could have "threatened the integrity and/or outcome of the adoption process which would have had potentially life-changing implications for the girls, as well as for Madonna and her family".
When the singer adopted Stella and Estere in February, she asked the media to "respect our privacy during this transitional time".
Madonna's lawyer said the singer will donate the damages to the Mercy James Institute for Paediatric Surgery in Malawi.
The 58-year-old opened the hospital earlier this year, naming it after another of her daughters.
Her lawyer said "she is pleased that at least some good can come out of the situation".
Madonna has six children, including four who were adopted from Malawi.