Abdullah Patel, from Bristol, asked if the candidates thought words had consequences, a question immediately directed to the front runner in the contest Mr Johnson.
Speaking on the BBC debate programme, the Imam asked the candidates: “I see first-hand the everyday impact of Islamophobic rhetoric on my community. Do the candidates agree that words have consequences?”
Host Emily Maitlis referred Mr Johnson to his earlier remarks, to which he said “of course” words have consequences.
The candidates all agreed to launch an investigation into Islamophobia in the Conservative party when prompted by Sajid Javid.
Mr Johnson added: “In so far as my words have given offence over the last 20 or 30 years when I have been a journalist and people have taken those words out of my articles and escalated them, of course I am sorry for the offence they have caused.
“But I would just say this to our friend from Bristol. When my Muslim great-grandfather came to this country in fear of his life in 1912, he did so because he knew it was a beacon of generosity and willingness to welcome people from around the world.
“If I am Prime Minister I will ensure that is the way our country acts and behaves.
After being reminded of the Imam’s name, Mr Johnson added: “In respect to what our friend said, of course I think my Muslim great-grandfather would have been astonished to find his great-grandson had become foreign secretary and an MP, but he would have been very proud.”
Ms Maitlis challenged Mr Johnson on his remarks, adding he had been “careless with his words” and asking if he worried of “doing more harm than good,” before raising the case of Nazanin Zaghari-Ratcliffe.
Imam Patel tweeted his disappointment with their "deluded" responses after the show.
As part of a longer thread, he tweeted: "What I got as a response was nothing short of disappointing and deluded:
As an Imam, I'm exposed to many incidents which happen in my community, and of course, as a visible Muslim, I also witness it first hand. I have received numerous incident reports of blatant racism against members of my community, from spitting and swearing at Muslim women...— Abdullah Patel (@AbdullahPatel94)June 18, 2019
"When they go to school they look different to the other kids. You know the best thing about this country is it doesn't matter at all."
Mr Javid, whose parents were Muslim immigrants who settled in Bristol, agreed that “words do have consequences” and added that Abdullah was right to be concerned about growing anti-Muslim sentiment in this country.
On the committment to tackle Islamophobia, Mr Javid added "It's great that we all agree on that," but said: "Behind it is a concern... of growing anti-Muslim hatred in our country, certainly over the last few years, in all parts of society, wherever that is - including in political parties - it must be absolutely rooted out."
The heated debate comes after Dominic Raab was eliminated from the contest in the second round of votes. Mr Johnson topped the second ballot, confirming his status as the favourite to replace Theresa May in Downing Street.
Mr Gove was in third place on 41 votes, while Mr Stewart was on 37.
Candidates needed 33 votes to remain in the race - the exact number picked up by Mr Javid.
They will face further votes on Wednesday and Thursday, which will whittle the field down to a final two.
The final phase will see some 160,000 party members choosing the next prime minister.