The singer bought the 1921 Cubist work, Three Women at the Red Table, in 1990 for $3.4m (£2.2m).
According to Sotheby's, proceeds from the sale "will benefit Madonna's Ray of Light Foundation, supporting girls' education projects in the Middle East and South Asia".
"Thanks to everyone who helped make it happen!" said the pop star on Facebook.
Before Tuesday's sale, Madonna said she wanted "to trade something valuable for something invaluable - educating girls".
The sale formed part of a Sotheby's sale of Impressionist and modern art that took more than $230m (£148.6m).
Les Pommes, a still life from by French artist Paul Cezanne, fetched the highest price, selling for $41.6m (£26.9m).
L'Amazone, a portrait of French socialite Baroness Marguerite de Hasse de Villers by Amedeo Modigliani, went for $25.9m (£16.7m).
A Pablo Picasso sculpture of his young muse Sylvette, meanwhile, sold for $13.6m (£8.8m).
Overall the auction failed to live up to last year's event, which saw a version of Edvard Munch's The Scream sell for a world record $119.9m (£77.4m).