All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
Perhaps, you are referring to the story that was narrated on the authority of Ibn Mas‘ood, may Allah be pleased with him, about the events of the Battle of Uhud, as cited by Imaam Ahmad and others. It says, "They looked and, behold, Hamzah's belly was cut open, and Hind had taken his liver and chewed it but could not eat it."
As mentioned in the story, it is about his liver and not his heart. The woman was Hind bint ‘Utbah, who later embraced Islam and became a righteous Muslim woman. She, may Allah be pleased with her, made the pledge of allegiance to the Prophet, sallallahu ‘alayhi wa sallam, and earned the pleasure of her Lord.
The reason for her actions was narrated in the book Dalaa'il An-Nubuwwah by Al-Bayhaqi; she had made a vow to eat his liver when he killed her father in the Battle of Badr.
In general, the authenticity of the story of Hind eating the liver of Hamzah is questionable. Even if it is assumed that the story is authentic, she (Hind) later embraced Islam and became a good and righteous Muslim; verily, Islam wipes out all past sins committed before it, as stated in the authentic hadeeth that was cited in Saheeh Muslim.
Allah knows best.