The singer wasn't in court Tuesday, but her lawyer confirmed that she had accepted "substantial" damages from Associated Newspapers, publisher of the Mail on Sunday.
The amount wasn't disclosed, but her lawyer, John Kelly, told Justice Peter Smith that she would donate the money to her Raising Malawi charity.
Madonna, who was divorced from Ritchie earlier this year, had sought damages in excess of $8 million.
Kelly said that the star went to great lengths to keep her December 2000 wedding private.
Three years later, he said, an interior designer who was working at Madonna's home in Beverly Hills in California copied at least 27 photos from the wedding album. The designer provided them to a woman who offered to sell them to the Mail on Sunday.
Kelly said the newspaper initially turned down the offer, but bought the pictures last year after Madonna and Ritchie announced that they would divorce.
The Mail on Sunday published them without consulting or warning her, Kelly said. Otherwise, Madonna would have sought a court ordering to block publication, he said.
No pictures of the wedding had been published before.