During the event in San Francisco, California, on Saturday (10Oct15), the President mocked Kanye's plans to run for the White House in 2020, which he announced at the MTV Video Music Awards in August (15).
The rapper, who calls himself 'Yeezy', was the butt of the jokes during Obama's speech to the 1,300-strong audience.
"Kanye is thinking about running for Speaker of the House. It couldn't get any stranger," Obama said. "But in case Kanye is serious about this whole POTUS (president of the United States) thing - or as he calls it, 'Peezy' - I do have advice for him."
In a suspected jab at Republican candidate hopeful Donald Trump, the President joked, "First of all, you have to spend some time dealing with some strange characters who act like they're on a reality TV show. You gotta be cool with that."
Referencing Kanye's 2010 album My Beautiful Dark Twisted Fantasy, Obama continued, "Second important tip: Saying you have a 'beautiful dark twisted fantasy' - that's what's known as 'off message' in politics. People have lost their congressional seats saying things like that."
Finishing his comical speech to laughter from the audience, Obama compared himself to the rapper - who is also from Chicago, Illinois - and said, "And number three: Do you really think this country's going to elect a black guy from the South Side of Chicago with a funny name to be president of the U.S.? That's crazy. That's cray (sic)."
Kanye was set to perform at the fundraiser, and brought along his pregnant wife Kim Kardashian to the event. She posted a photo earlier on Saturday on Instagram.com showing two boxes of Kanye's Adidas Yeezy trainers with Post-It notes saying "Obama" on them.
Kim wrote in a caption, "Special delivery #yeezys".
Over the weekend (10-11Oct15), the rapper also surprised American Idol judges, and host Ryan Seacrest, by pretending to audition for the singing competition. Kim posted a photo of a shocked Jennifer Lopez and Harry Connick, Jr. on Instagram.com with the caption "SURPRISE!"
Ryan also posted a photo of a smiling Kanye on Twitter.com, joking that the star has made to the final rounds in Los Angeles. "See u in Hollywood @kanyewest (you too @KimKardashian) #idolauditions (sic)."