If a person works as an agent on behalf of another person and is what is known as a lawyer in a case in a country that is governed by man-made laws that go against Islamic sharee’ah, in every case in which he defends falsehood knowingly, relying in his defence on man-made laws, he is a kaafir if he regards doing that as being something permissible, or if he is heedless and does not care that he is going against the Qur’aan and Sunnah and following the laws that have been promulgated by man. Whatever he earns for doing that is haraam income.
In every case in which he defends falsehood knowingly, believing it is haraam but motivated by greed to earn money by winning on the case, he is a sinner who is committing a major sin, and whatever he earns is haraam income and it is not permissible for him to take it.
If he defends his client in a case in which he believes that he is in the right in shar’i terms, and he strives according to what he knows from the evidence of sharee’ah, then he will be rewarded for that, excused for his mistakes, and he is entitled to be paid for his defence.
If he defends his brother’s rights and believes that he is right, then he will be rewarded and is entitled to the payment that he has agreed upon with his client.