The Prophet ordered the killing of Abu Sufyan (ra) because he was an arch-enemy of the Muslims. He persecuted and killed many Muslims. The Prophet dispatched a few companions to kill him, but the mission failed. But on their way to Abu Sufyan (ra), there were clashes between the Prophet’s companions and some idolaters who supported Abu Sufyan. Hence, three of the polytheists were killed.
Kitab Al-tabaqat Al-Kabir – Ibn Sa’d:
THE SARIYYAH OF AMR IBN UMAYYAH AL-DAMRI
Then (occurred) the sariyyah of Amr Ibn Umayyah Al-Damri and Salamah Ibn Aslam Ibn Haris against Abu Suyan Ibn Harb at Makkah. It was (undertaken) because Abu Sufyan Ibn Harb had said to a party of the Quraish: Is there not any one who will (kill) Muhammad unexpectedly because he gose to the markets? Thereupon one of the Bediounes came to him and said: I am a man of most daring heart, among the people, sturdy in body and most quick in assault. If you support me, I shall go to him and (kill) him by surprise. I have a dagger like the inner feathers of a vulture, so I shall attack him, then I shall join a caravan and leave behind the people running because I know the ways fully. He (Abu Sufyan) said:
You are our friend. Then he gave him a camel and provided expenses and said: keep this affair a secret.
Accordingly he set out in the night and travelled forfive nights with his beast, arriving on the sixth morning at Zahr al-Harrah, Then he began to inquire about the Apostle of Allah, and he was led to him.
He tied his beast and down came to the Apostle of Allah, who was in the Mosque of Banu Abd al-Ashhal. When the Apostle of Allah, saw him, he said;
Verily this is the person who has treacherious intentions. He rushed forward to make an assault on the Apostle of Allah. Usayd Ibn al-hudayr caught hold of his trousers and lo! There was a dagger in it which fell. He was bewildered and said;
My blood, my blood (i.e., do not kill me). Usayd seized him by the neck and violently pushed him away. The Apostle of Allah, said to him:
Tell me the truth, who art thou? He said:
Am I safe?
He (Prophet) said: Yes. Then he furnished with full information about the affair and what Abu Sufyan had done. The Apostle of Allah, set him free. 
THE MISSION OF AMR B. UMAYYAH AGAINST ABU SUFYAN
The story of Amr b. Umayyah al-Damri, when he was sent by the Messenger of God to kill Abu Sufyan b. Harb.
When the men whom the Prophet had sent to Adal and al-Qarah were killed at al-Raji and the news reached the Messenger of God, he sent Amr b. Umayyah al-Damri and one of the Ansar to Mecca, ordering them to kill Abu Sufyan b. Harb. According to…: After the death of Khubayb and his companions, the Messenger of God sent me together with one of the Ansar, saying, ‘Go to Abu Sufyan b. Harb and kill him. …’ 
Ṣafi al-Raḥman Mubarakfuri:
“Biographers also reported that Amr bin Umaiyah ad-Damri and Salamah bin Abi Salamah were sent on a task to kill Abu Sufyan, the chief of Quraish, who had already sent a bedioun to kill the Prophet. The two-man mission failed except three polytheists killed on the way. It is noteworthy that all the forgone invasions did not imply real bitter fighting, they were rather clashes or punitive military movements carried out to deter some enemies still not surrendered. Deep consideration on the development of war circumstances reveal the continuous collapse of the morale among the enemies of Islam, who had come to understand that they were no longer in a position to stop the Islamic call or weaken its active drive. This state of affairs reached its climax with the Treaty of Al-Hudaibiyah when the two confronting parties, believers and disbelievers, entered into a truce agreement that pointed markedly to the ever-growing power of Islam, and unequivocally recorded the continuation of this heavenly religion in Arabia.” 
“Another arch-enemy of the Prophet was Abu Sufyan, who took a leading part in all the expeditions against him. He it was who spoke evil of Muhammad in the court of Heraclius. …” 
Don’t forget to follow Discover The Truth on Facebook and Twitter. PLEASE help spread the word by sharing our articles on your favourite social networks. Thank You! Jazaka’Allahu Khayran.
 Kitab Al-tabaqat Al-Kabir – By Ibn Sa’d, volume 2, page 115 – 117
 The History of al-Tabari – The Foundation of the Community: Muhammad At Al-Madina, volume 7, page 147
 Ar-Raheeq Al-Makhtum – Sealed Nectar: Biography Of The Noble Prophet, By Ṣafi al-Raḥman Mubarakfuri, page 396 – 397
 The Ideal Prophet – Aspects of the Life and Qualities of the Holy Prophet Muhammad By Khwaja Kamal-ud-Din, page 176