Allah, exalted be His praise, says: "O you who believe, be steadfast for Allah, witnesses in justice, and let not the enmity of a people lead you to not act justly. Act justly; that is nearer to righteousness." [Surah al-Ma'idah: 8]
And He said: "O you who believe, be steadfast in justice, witnesses for Allah, even if (the testimony) is against yourselves or your parents and close relatives. Whether one is rich or poor, Allah is more caring of them both, so do not follow your desires." (to the end of the verse) [Surah al-Nisa': 135]
And He said: "And do not conceal testimony; whoever conceals it, his heart is surely sinful, and Allah knows well what you do." [Surah al-Baqarah: 283]
Imam al-Shafi'i (may Allah have mercy on him) said: "What I remember from all the people of knowledge from whom I have heard concerning this verse is that it is about the witness upon whom testimony has become binding."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / Q20590
Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both), concerning the saying of Allah Almighty: "Testify for Allah with justice, even if it is against yourselves or against your parents and close relatives" [Surah al-Nisa': 135], says: Even if it is against your fathers or your sons; and do not favour a rich man because of his wealth, nor show mercy to a poor man because of his poverty (so that you fail to give true testimony). The saying of Allah Almighty: "If he is rich or poor, Allah is closer to them both (and more caring of them)" [Surah al-Nisa': 135]. The saying of Allah Almighty: "So do not follow your desires, lest you fail to act justly" [Surah al-Nisa': 135], meaning: do not abandon the truth and commit injustice.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20590
Mujahid (may Allah have mercy on him), concerning this saying of Allah Almighty: "And if you distort or turn away, then indeed Allah is ever aware of what you do" [Surah al-Nisa': 135], says: "If you alter the testimony or conceal it, Allah is aware of what you do."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20591
Ubadah bin al-Walid bin Ubadah bin al-Samit narrates from his father (Sayyiduna Ubadah bin al-Samit, may Allah be pleased with him) that we pledged allegiance to the Messenger of Allah (peace and blessings be upon him): "To hear and obey, in hardship and in ease, in times of eagerness and of reluctance, and when preference is given, that is, when others are preferred over us; and that we will not wrest authority from those who hold it; and that we will speak the truth and not fear, in the matter of Allah, the blame of any blamer."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20592
Abu Dawud (may Allah have mercy on him) says: I heard (this) from Shu'bah (may Allah have mercy on him) 45 or 46 years ago, that a man came to the Prophet (peace and blessings be upon him) and said: Tell me of a deed that will admit me into Paradise. He (peace and blessings be upon him) said: "Act justly, and give away your surplus wealth." He said: What if I am not able to do that? He (peace and blessings be upon him) said: "Feed people and spread (the greeting of) peace." He said: What if I do not have the strength or the ability for that? He (peace and blessings be upon him) said: "Do you have camels?" He said: Yes. He (peace and blessings be upon him) said: "Take one camel from your camels and a waterskin, and look for a household that only gets to drink water every other day, and give them water to drink. It may be that your camel will not perish and your waterskin will not tear before Paradise becomes due for you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20593