The Malcolm X and Do the Right Thing director said he was "shocked, happy, surprised and proud".
Spike Lee has premiered seven films at the festival, with his 2018 movie BlacKkKlansman receiving wide acclaim. His appointment follows criticism of the Oscars nominations for ignoring actors and directors of colour.
Nineteen of the 20 acting nominees this year are white - the highest number since the #OscarsSoWhite protests of 2015 and 2016, of which Lee was a vocal supporter.
He refused to the attend 2016 Oscars ceremony, prompting some other filmmakers and actors to follow. Three years later, he won his first competitive Oscar for best-adapted screenplay (BlacKkKlansman).
In response to his Cannes role, the 62-year-old said in a statement that his "biggest blessings... have happened out of nowhere". "I'm honored to be the first person of the African diaspora (USA) to be named president of the Cannes jury and of the main film festival. "To me, the Cannes film festival (besides being the most important film festival in the world - no disrespect to anybody) has had a great impact on my film career.
"You could easily say Cannes changed the trajectory of who I became in world cinema," he added. The Cannes film festival's official statement said Lee's work had "brought the questions and contentious issues of the times to contemporary cinema" and acknowledged that many of his films had achieved cult status.