There is one word that captures the essence of all Islamic laws and all Islamic teachings; one word that describes the overriding value that permeates all Islamic values. Justice. The Qur'an says:
لَقَدْ أَرْسَلْنَا رُسُلَنَا بِالْبَيِّنَاتِ وَأَنزَلْنَا مَعَهُمُ الْكِتَابَ وَالْمِيزَانَ لِيَقُومَ النَّاسُ بِالْقِسْطِ ۖ وَأَنزَلْنَا الْحَدِيدَ فِيهِ بَأْسٌ شَدِيدٌ وَمَنَافِعُ لِلنَّاسِ وَلِيَعْلَمَ اللَّهُ مَن يَنصُرُهُ وَرُسُلَهُ بِالْغَيْبِ ۚ إِنَّ اللَّهَ قَوِيٌّ عَزِيزٌ
"We sent aforetime our messengers with clear Signs and sent down with them the Book and the Balance that men may stand forth in Justice." [Quran 57:25].
The sole purpose of sending the prophets was to establish Justice in the world and end injustice. Broadly speaking, doing justice means giving everyone his due. Nevertheless, this simple statement camouflages all the complexities of life in their myriad and ever-changing relations. To guide the people, Allah sent down the prophets with clear signs, the Book, and the Balance. The Book contains the revelations that spell out what's fair and unfair or right and wrong. The Balance refers to our ability to measure and calculate so we can follow the path shown by the Book and explained by the Prophets (peace be upon them).
Under normal circumstances, many people can be just. But Islam commands its followers to be just even in the face of strong conflicting emotions. In dealing with other human beings, two major impediments to justice are love and hatred.
See how the Qur'an teaches us to overcome the first impediment when we are dealing with our closest relatives or even ourselves.
يَا أَيُّهَا الَّذِينَ آمَنُوا كُونُوا قَوَّامِينَ بِالْقِسْطِ شُهَدَاءَ لِلَّهِ وَلَوْ عَلَىٰ أَنفُسِكُمْ أَوِ الْوَالِدَيْنِ وَالْأَقْرَبِينَ ۚ إِن يَكُنْ غَنِيًّا أَوْ فَقِيرًا فَاللَّهُ أَوْلَىٰ بِهِمَا ۖ فَلَا تَتَّبِعُوا الْهَوَىٰ أَن تَعْدِلُوا ۚ وَإِن تَلْوُوا أَوْ تُعْرِضُوا فَإِنَّ اللَّهَ كَانَ بِمَا تَعْمَلُونَ خَبِيرًا
"O ye who believe! Stand out firmly for justice, as witnesses to Allah, even as against yourselves, or your parents, or your kin, and whether it be (against) rich or poor: for Allah can best protect both. Follow not the lusts (of your hearts), lest ye swerve, and if ye distort (justice) or decline to do justice, verily Allah is well-acquainted with all that ye do." [Quran 4:135]
Here is the resolution from the Qur'an of the perennial conflict between self-interest and justice. Be just, even if it is against your narrowly defined self-interest or of those very close to you. Ignorant people think they are protecting their self-interest by being unjust to others. Their decision to be just or unjust may be based on a cold calculation of self-interest. But real faith in Allah elevates one beyond that narrow-mindedness. These verses remind us that the real protector of interests of all people is also Allah and He will protect us when we follow His command to be just. The justice demanded by Islam permits no favoritism.
The other equally potent impediment is hatred. Here again, Qur'an commands:
يَا أَيُّهَا الَّذِينَ آمَنُوا كُونُوا قَوَّامِينَ لِلَّهِ شُهَدَاءَ بِالْقِسْطِ ۖ وَلَا يَجْرِمَنَّكُمْ شَنَآنُ قَوْمٍ عَلَىٰ أَلَّا تَعْدِلُوا ۚ اعْدِلُوا هُوَ أَقْرَبُ لِلتَّقْوَىٰ ۖ وَاتَّقُوا اللَّهَ ۚ إِنَّ اللَّهَ خَبِيرٌ بِمَا تَعْمَلُونَ
"O ye who believe! Stand out firmly for Allah, as witnesses to fair dealing, and let not the hatred of others to you make you swerve to wrong and depart from justice. Be just: that is next to Piety: and fear Allah. For Allah is well-acquainted with all that ye do." [Quran 5:8]
In other words you cannot do injustice even when you are dealing with the enemy. The natural is to treat the enemy as less than a human being; one who has no rights and deserves no justice or fairness.
It was as true in the pre-Islamic tribal jahilya (based on ignorance) society as it is today. See how Islam directly curbs it. It is a command to the believers, with a reminder that Allah is watching you, that enmity of others cannot be used as an excuse for committing injustices against them.
Fourteen hundred years ago these commands created a society where rich and poor, friend and foe, Muslim and non-Muslim, the ruler and the ruled, were all treated equally and all of them could count on receiving justice. The qaadi (judge) were independent and no one, including the caliph was above the law. If a dispute arose between the caliph and an ordinary person, both had to appear in court and provide their evidence. Islamic history is full of stories of this justice that filled the earth wherever Muslims ruled in their golden era.
In short from the aforementioned above, one may conclude that justice is an obligation of Islam and injustice is forbidden and denied.
إنَّ اللَّهَ يَأْمُرُكُمْ أَن تُؤَدُّوا الْأَمَانَاتِ إِلَىٰ أَهْلِهَا وَإِذَا حَكَمْتُم بَيْنَ النَّاسِ أَن تَحْكُمُوا بِالْعَدْلِ ۚ إِنَّ اللَّهَ نِعِمَّا يَعِظُكُم بِهِ ۗ إِنَّ اللَّهَ كَانَ سَمِيعًا بَصِيرًا
"Allah doth command you to render back your Trusts to those to whom they are due; and when ye judge between man and man, that ye judge with justice: verily how excellent is the teaching which He gives you! For Allah is He Who hears and sees all things." [Quran 4:58]