The Prophet Mohammad ordered the killing of Harith ibn Hisham on the conquest of Makkah because he joined in a number of wars against the Muslims. But he (Harith) asked to be forgiven and the Prophet (p) granted his wish.
Tabari:
Footnote 677:
Al-Harith b. Hisham b. al-Mughirah al-Makhzumi, a member of an important Meccan family, fought on the pagan side at the battles of Badr and Uhud. He was the nephew of the Prophet’s wife Umm Salamah bt. Al-Mughirah and became a Muslim at the time of the conquest of Mecca. [1]
In the following Hadith it shows that Al-Harith bin Hisham was involved in the battle of ‘Uhud’ against the Muslims. Jami` at-Tirmidhi reports:
Narrated Salim bin ‘Abdullah bin ‘Umar: from his father: “On the Day of Uhud, the Messenger of Allah said: ‘O Allah! Curse Abu Sufyan! O Allah! Curse Al-Harith bin Hisham! O Allah! Curse Safwan bin Umayyah!’ He said: ‘So the following was revealed: Not for you is the decision; whether He turns in mercy towards them [or punishes them] (3:128).’ So Allah turned in mercy towards them, they accepted Islam and their (adherence to) Islam was good.” (Jami` at-Tirmidhi Volume 5, Book 44, Hadith 3004)
Reference:
[1] The History of al-Tabari – The Victory of Islam: Muhammad at Medina, volume 8, page 160