In Surah an-Nisa ayah 94, the guidance given is that in the case of one who professes to be a Muslim, no Muslim is allowed to interpret his declaration of Islam as hypocrisy, without certain knowledge and proof. This ayah 94 was revealed in the background of certain episodes relating to some Companions where they had not taken the correct line of action.
So, it has been reported from Abdullah ibn Abbas in Tirmidhi and the Musnad of Ahmad that a man from the tribe of Banu Sulaym met a group of the Companions who were going on a jihad mission. This man was grazing his goats. He offered salaam to the group which was a practical demonstration of his being a Muslim. The Companions thought that this man was just pretending in view of the situation before him. Thus, taking his profession of Islam as a ruse to save his life and property whereby he could get away from them by tricking them with greeting in the Muslim style, they killed him and appropriated the herd of his goats as war spoils which they took to the Prophet sallAllahu aalyhi wa sallam. Thereupon, this ayah was revealed. It laid down the rule: Do not take anyone who greets you be offering salaam in the Islamic manner as a pretender and never assume, without valid proof, that his profession of Islam was a trick and never take possession of his property as spoils. [Ibn Katheer]
There is another narration from Abdullah ibn Abbas which has been reported by al-Bukhari briefly and by al-Bazzar, in details. According to this narration, the Prophet sallAllahu aalyhi wa sallam sent out a group of mujahideen which included Miqdad ibn al-Aswad. When they reached the designed spot, everyone present there ran away. The only man left there had a lot of valuable things with him. Facing the Companions, the man recited the kalimah, “I testify that there is no god but Allah”. But, Miqdad radhiAllahu anhu assuming that the man’s heart was not behind his verbal declaration of faith and that he was doing it simply to save his life and property, killed him. One Companion from among the group present admonished him for what he had done. He had killed a person who had testified that there is no god but Allah. He declared that he will make it a point to relate this incident before the Prophet sallAllahu aalyhi wa sallam when and if he would have the honor of returning to him. Finally, the group returned to Madina and reported the incident to the Prophet sallAllahu aalyhi wa sallam who called for Miqdad and gave him a stern warning. He said, “What would you say on the Day of Judgment when the kalimah will stand as a plaintiff against you?” Ayah 94 was revealed on this occasion.
Other incident, apart from the two mentioned here, have been reported with reference to this ayah, but respected scholars of Tafseer do no admit any contradiction in these narrations, for these events as a whole could have been the cause of the revelation.
The words of the ayah are “offer you salaam”. If the word, salaam in the text is taken to mean ‘salaam’ in the technical sense [Muslim greeting or salutation], it applies to the first event more suitably. However, if salaam is taken to mean submission or surrender to the will of Allah in the literal sense, then, this meaning applies to both events equally. Therefore, salaam in the present textual setting has also been translated in the sense of submission and obedience to Allah.