Hazrat Zainab (ra) was still living in Makkah at this time. At the Battle of Badr the Muslims defeated the Makkans and some of the disbelievers were held as captives. Hazrat Abul-‘As (ra) was among those taken captive.
When the news of their captivity reached Makkah the relatives of the captives sent ransom to gain their release. Hazrat Zainab (ra) gave her brother-in-law the garnet necklace that was a wedding gift from her mother. She offered her valuable necklace to be used as ransom to gain freedom for Hazrat Abul-‘As (ra).
When the Holy Prophet (sas) saw the necklace among the articles of ransom his eyes welled up. It reminded him of his beloved wife, Hazrat Khadijah (ra), who had passed away after the cruel boycott which forced the Muslims to take refuge in the valley of Abi Talib. The memories of his wife came back to him at the sight of the necklace. The Holy Prophet (sas) asked the Muslims if they would set Hazrat Abul-‘As (ra) free and return the necklace as well. This is because the necklace was very precious and dear to the Holy Prophet (sas) and reminded him of his beloved wife Hazrat Khadijah (ra). The companions immediately fulfilled this wish of the Holy Prophet (sas) with complete sincerity, love, and obedience. Therefore Hazrat Abul-‘As (ra) was set free and the necklace was returned to Hazrat Zainab (ra).