Mujahid said: "'God does not put two hearts in one man's bosom' was revealed concerning a man of Quraysh who claimed to have two hearts, as a boast of of his mental abilities. He used to say, 'In my bosom, there are two hearts, and each one of them has more intellectual capacity than Muhammad.' This man was from the Banu Fihr."
Al-Wahidi, al-Qushayri, and others say: "This was revealed concerning Jamil ibn Ma‘mar al-Fihri, a man of prodigious memory for everything he heard. 'Anyone who can remember so many things must have two hearts,' said the Quraysh. 'I have two hearts,' he used to say, 'both of which have more intellectual capacity than Muhammad.'
"Jamil ibn Ma‘mar was with the idolaters at the battle of Badr when they were put to flight. Abu Sufyan saw him mounted on an ass, with one sandal fastened to his hand and the other to his foot. 'How's the battle going?' he asked him. 'Our people have been put to flight,' Jamil said. 'So why do you have one sandal on your hand and the other on your foot?' asked Abu Sufyan. 'I thought they were both on my feet,' said Jamil. And so his absent-mindedness was discovered, for all that he had two hearts."
Al-Suhayli said: "Jamil ibn Ma‘mar al-Jumahi was the son of Ma‘mar ibn Habib ibn Wahb ibn Hudhafa ibn Jumah—Jumah who was also called Taym. He claimed to have two hearts, and it was concerning him that the Qur’anic verse was revealed. He is also mentioned in this verse of poetry (meter: ṭawīl):
How will I abide in Medina, after
Jamil ibn Ma‘mar seeks it no more?"
From al-Qurtubi's Comprehensive Judgments of the Quran