The 56-year-old was joined by Jimmy Fallon and The Roots, who used classroom instruments as their accompaniment.
Wearing sunglasses, the singer delivered a classic performance, complete with a whistle and cowbell.
'How cool is Madonna?' Fallon said after the clip aired.
'I kind of sucked though,' Madonna said later. 'I forgot the words.'
For the next segment Madonna danced onto the stage wearing several gold chains and her gold grill for an interview with Fallon that included the Tonight Show host remembering a pelvic-thrusting dance move she taught him.
'I just want to apologize to my children for having seen that,' he said.