The singers were both honoured by the American Society of Composers, Authors and Publishers (ASCAP) at the organisation's Centennial Awards, which are handed out to accomplished artists once every 100 years.
During the ceremony marking Ascap's 100th anniversary, Joel was the first to pick up a prize and he told the audience, "It's been an amazing year for me... I'm overwhelmed."
Joel was then honoured by veteran rocker Sting, who performed a version of Joel's song Big Man on Mulberry Street, before the Piano Man himself took to the stage to sing New York State of Mind.
Wonder was handed his prize following a tribute performance by India.Arie, and he told the crowd, "Even before I wanted to be a singer, I wanted to be a songwriter. Let us continue to write, continue to encourage and inspire. Without us writing, the world will lose its magic."
Country star Garth Brooks was also honoured at the ceremony, and he was presented with his award by his singer wife Tricia Yearwood, who performed her husband's hit If Tomorrow Never Comes.
Emmylou Harris was on hand to fete folk star Joan Baez, but the night's other honouree, veteran composer Stephen Sondheim, was absent from the gala at the Waldorf Astoria Hotel due to illness.
Actress/singer Bernadette Peters marked Sondheim's achievements by singing Children Will Listen from his musical Into the Woods.