Obama expressed his desire in response to a question from a student Lilly during his discussion with 9th graders at Wakefield High School in Arlington Virginia.
Obama went to give a national speech welcoming students back to school. He called for students to take responsibility and to learn from their failures so that they succeed in the end.
"Hi. I'm Lilly. And if you could have dinner with anyone, dead or alive, who would it be?," Obama was asked by one of the students.
"Dinner with anyone dead or alive? Well, you know, dead or alive, that's a pretty big list," Obama responded amidst laughter. The next moment he was serious.
"You know, I think that it might be Gandhi, who is a real hero of mine," Obama said. "Now, it would probably be a really small meal because he didn't eat a lot," he said amidst laughter.
But Mahatma Gandhi is someone who has inspired people across the world for the past several generations, he said.
Terming the iconic figure as the source of inspiration for many, Obama said "He (Mahatma Gandhi) is somebody whom I find a lot of inspiration in."
"He inspired Dr King (Martin Luther), so if it hadn't been for the non-violent movement in India, you might not have seen the same non-violent movement for civil rights here in the United States." he said.
"I am always interested in people who are able to bring about change, not through violence, not through money, but through the force of their personality and their ethical and moral stances. That is somebody that I would love to sit down and talk to," said Obama.