The Ruling on Beating the Accused During Interrogation
Question :
Is it permissible in the Islamic Law to beat the accused during the interrogation so that he confesses? And does Islam approve of the legal profession? And is it permissible to defend a criminal?
Answer:
Beating is permissible if the suspicion is strong and the signs of it are manifest. As for (cases of) general suspicion, beating is not permissible, nor is torture. Whoever confesses under torture and duress, his confession is not considered. sufficient cause for the implementation of punishment, nor for taking the right to which he has confessed. If clear evidences exist, the Judge may act upon them and implement what he sees fit.
As for legal representation, it is the processes of appointing someone to act as one's representative in lawsuits in order to obtain one's personal rights. So it is permissible for that person. to appoint one who can argue his case, due to his own inability or ignorance, or the like. But it is an obligation upon the appointed representative, or the one who is hired, to advise him and inform him of his rights and his obligations before representing him, in accordance with his knowledge.
If he knows that he is an oppressor or a criminal, it is forbidden for him to defend him, even if he paid him a large fee, because this includes supporting falsehood and approving of the oppressor and helping him in his oppression.
And Allah knows best.
Source:
Ibn Jibreen
Fatawa Islamiyah, Vol. 6 Pages 444-445