Obama, appearing in a taped video, told the audience Thursday that he's been listening to Jay Z since he was a "young and hungry state senator" and compared himself to the New York rapper.
"Nobody who met us as younger men would have expected us to be where we are today. You know what it's like not to have a father around, you know what it's like not to come from much, and to know people who didn't get the same breaks that we did. So we try to prop open those doors of opportunity so that it's a little easier for those who come up behind us to succeed as well," Obama said, earning an applause from the audience in New York City.
"Jay and I are also fools for our daughters, although he's going to have me beat once those two twins show up. And let's face it, we both have wives who are significantly more popular than we are," he added.
Jay Z became the first rapper inducted into the prestigious organization and was the first hip-hop act nominated for the honor. The icon, who rarely tweets, posted multiple messages on Twitter around the time the ceremony took place, naming rappers who he admires, from veterans like Rakim and Nas to contemporaries such as Kendrick Lamar and J. Cole.
"Thank you to all the people that have inspired me," Jay Z, born Shawn Carter, tweeted. "Salute to anybody who made a song to feed their family or just vent."
The 2017 Songwriters Hall class also included Motown founder Berry Gordy; R&B maestro Kenneth "Babyface" Edmonds; songwriting duo Jimmy Jam & Terry Lewis; pop music great Max Martin; and members of Chicago.
Jon Bon Jovi kicked off the multi-hour event at the Marriott Marquis Hotel with "It's My Life," his band's 2000 hit that Martin co-wrote. Bon Jovi said that Martin, who has written monster hits for Taylor Swift, the Backstreet Boys and other pop stars, had been a part of 22 No. 1s, placing him only behind John Lennon and Paul McCartney.
Martin, who rarely does interviews or appears in public, called the induction "unbelievable."
Johnny Gill, the New Edition member and solo singer, earned the night's loudest applause when he performed "My, My, My," one of many hits written by Babyface. Gill worked the stage from left to right, and even jumped down to the audience to scream the song's groovy lyrics, bringing them to life.
Babyface, who wrote hits for Whitney Houston, Toni Braxton and others, said he's amazed that "I, Kenny Edmonds, this little black kid from Indianapolis, Indiana, wrote a song and somebody in ... Kansas is singing the words to right now."
Pat Monahan of Train sang in honor of Robert Lamm and James Pankow of Chicago, while Rhonda Ross Kendrick, Gordy's daughter with Diana Ross, performed for her father.
"Most people think I got this award many years ago," said Gordy, who has written songs for Marvin Gaye, the Supremes, Stevie Wonder and the Jackson 5. "Songwriting was my first love."
Usher performed a medley to pay homage to Jam and Lewis, the duo behind countless hits for Janet Jackson as well as George Michael, Mariah Carey and Boyz II Men.
"Without us the music doesn't exist," Jam said of songwriters.
Ed Sheeran, who performed his hit "Castle on the Hill," was honored with the Hal David Starlight Award. The English singer, who writes his own music and has also written for Justin Bieber and One Direction, said the "happiest moments of my life" are when he's writing songs.
"There's nothing like that moment," he added.
Pitbull closed the show with a performance and earned the Global Ambassador Award.
Songwriters are eligible for induction after writing hit songs for at least 20 years.