The former Beatle accepted the third Gershwin Prize For Popular Song from the President at the event and played a show. He serenaded the first lady by playing The Beatles' song 'Michelle', directing the lyrics at her, reports The Guardian.
The Jonas Brothers, Faith Hill, Elvis Costello, Emmylou Harris, Jack White and Dave Grohl were among the other performers at the tribute event for McCartney.
Barack Obama said that the singer and bassist had "helped to lay the soundtrack for an entire generation".
McCartney added: "I don't think there could be anything more special than to play here."
Video of the event: