And do not incline toward those who do wrong, lest you be touched by the Fire, and you would not have other than Allāh any protectors; then you would not be helped.
Allah, the Exalted, commands His Messenger and His believing servants to be firm and to always be upright. This is of the greatest aid for gaining victory over the enemy and confronting the opposition. Allah also forbids transgression, which is to exceed the bounds (of what is allowed). Verily, transgression causes destruction to its practitioner, even if the transgression was directed against a polytheist. Then, Allah informs that He is All-Seer of the actions of His servants. He is not unaware of anything and nothing is hidden from Him. Concerning Allah's statement,
وَلاَ تَرْكَنُواْ إِلَى الَّذِينَ ظَلَمُواْ
(And incline not toward those who do wrong,) `Ali bin Abi Talhah said that Ibn `Abbas said, "Do not compromise with them." Ibn Jarir said that Ibn `Abbas said, "Do not side with those who do wrong." This is a good statement. This means, "Do not seek assistance from wrongdoers, because it will be as if you are condoning their actions (of evil)."
(lest the Fire should touch you, and you have no protectors other than Allah, nor you would then be helped.) This means that you will not have besides Allah any friend who can save you, nor any helper who can remove you from His torment.
Ma'arif al-Qur'an
Mufti Muhammad Shafi
To keep human beings protected from this disorder and corruption, another guideline has been provided in the second verse (113): وَلَا تَرْكَنُوا إِلَى الَّذِينَ ظَلَمُوا فَتَمَسَّكُمُ النَّارُ (And do not incline towards the wrongdoers, lest the Fire should catch you). The word: لَا تَرْكَنُوا (la tarkan u) comes from the verbal noun رکون : Rukun which means a slight tilt towards one side having confidence in and approval of it. Therefore, the sense of the verse is: ` Whoever indulges in injustice and oppression ruins his or her life, worldly and spiritual both - this is a fact everyone knows. But, the slightest of tilt or inclination towards the unjust, placing confidence in them, being pleased with them, could also push man to the edges of the same abyss.'
What is the meaning of this ` tilt' and ` inclination'? There are some statements of Sahabah (Companions) and Tabi` in (Successors) about it in which there is no contradiction or difference. They are all correct in their respective places.
Sayyidna Qatadah (رح) said, it means, ` do not have friendship with the unjust and do not follow what they say.' Ibn Jurayj said, ` do not nurse a leaning of any kind towards the unjust.' Abu al-'Aliyah said, ` do not like everything they do.' (Qurtubi) Al-Suddiyy said, ` do not court the favor of the unjust through servile flattery (mudahanah), that is, do not observe silence or show your approval at their evil deeds.' ` Ikrimah said, ` do not sit in the company of the unjust.' Qadi al-Baidawi said, ` following them in personal looks, fashion, and ways of living are all included under this very prohibition.'
Qadi al-Baidawi also said that this verse exudes the highest imaginable degree of severity in the matter of prohibition and unlawfulness of injustice and oppression. The reason is that it not only prohibits friendship, and all other cordial relationships, with the unjust but, going farther ahead, it also prohibits the least possible inclination to-wards them, or even sitting with them.
Imam ` Abdur-Rahman ibn ` Amr Al-Awza` i said, ` with Allah Ta` ala no one is as detested as the ` Alim (religious scholar) who, for the sake of his worldly interest, goes to meet someone unjust. (Mazhari)
According to Tafsir al-Qurtubi, this verse tells us that it is obligatory (wajib) to abstain from the company of those who disbelieve (kafirs), those who disobey (sinners) and those who innovate in the established religion (practitioners of bid'ah) - unless they have to be met under some compulsion. The truth of the matter is that company and social setting play a major role in one's betterment or corruption. Therefore, the famous Hasan al-Basri said about the two words of these two verses that Allah Ta` ala has compressed the entire religion within the two letters: لَا (la: do not). The first one appears in the first verse: لَا تَطغَوا (la tatghaw: do not cross the limits - 112) and the second one appears in the second verse: لَا تَرکَنُوا (la tarkanu: And do not incline towards the wrongdoers - 113). The first ` la' or ` do not' prohibits the crossing of the limits set by the Shari’ ah of Islam while the other prohibits the company of wrongdoing people - and this is the essence of the whole religion.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 110–114
This means that the addressees of the Book given by God to Moses had diverse opinions about its statements. Some of them rejected them and some of them accepted them. (at-Tabari). Whenever a statement is made, a man has two alternatives—one is to make the correct interpretation of it and the other is to make the wrong interpretation of it. If the hearers are really serious, they will inevitably arrive at the one correct interpretation. Their seriousness will guarantee their unity of opinion. On the contrary, if they are not serious, they will not give the statement any importance and will interpret it differently according to their own individual thinking. One will say this and the other will say that. In this way their levity will lead them to differences of opinion. This happened in the case of all the prophets. God has nevertheless tolerated this, because He has created the present world as a place for the performance of deeds and the coming world as a place for reward or retribution. That is the way of God. That is why people are given full respite here. The present state of affairs is entirely due to this respite being given so that human beings may be tested and not due to God being under any compulsion.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.