It depends on the nature of the case. In civil litigation, the court is not responsible for assigning lawyers, and the parties themselves can apply for legal aid from the legal aid center. If it is a public prosecution case and the defendant is underage or deaf-mute, the court shall notify the legal aid institution to appoint a lawyer to defend him. The Criminal Procedure Law stipulates that if a criminal suspect or defendant fails to entrust a defender due to financial difficulties or other reasons, he or his close relatives may apply to a legal aid institution. To meet the conditions of legal aid, legal aid institutions shall appoint lawyers to defend them.
Criminal procedure law
Article 35
If a criminal suspect or defendant fails to entrust a defender due to financial difficulties or other reasons, he or his close relatives may apply to a legal aid institution. To meet the conditions of legal aid, legal aid institutions shall appoint lawyers to defend them.