Foreign participation in domestic law firms is prohibited as per the restrictions in the foreign investment 'negative list'. Legal conselling on Chinese legal affairs is also included in the prohibited category of the [foreign investment] 'Negative List'. Foreign law firms are, however, allowed to establish representative offices to practice law other than Chinese law.
"Article 2. This Law shall apply to foreign investment within the territory of the People's Republic of China (hereinafter referred to as the territory of China).
The term "foreign investment" as mentioned in this Law refers to investment activities conducted directly or indirectly in China by foreign natural persons, enterprises or other organizations (hereinafter referred to as foreign investors), including the following situations:
(1) A foreign investor establishes a foreign-invested enterprise in China alone or jointly with other investors;
(2) Foreign investors acquire shares, equities, property shares or other similar rights and interests of enterprises within the territory of China;
(3) Foreign investors alone or jointly with other investors invest in new projects in China;
(4) Investment in other forms prescribed by laws, administrative regulations or the State Council.
The term "foreign-invested enterprises" as mentioned in this Law refers to enterprises wholly or partly invested by foreign investors and registered and established within the territory of China in accordance with Chinese laws.
[...]
Article 4. The state implements a pre-establishment national treatment plus negative list management system for foreign investment.
The pre-establishment national treatment referred to in the preceding paragraph refers to the treatment given to foreign investors and their investments at the stage of investment access no less than that given to domestic investors and their investments; Special access management measures for investment implementation. The state shall give national treatment to foreign investment outside the negative list.
[...]
Chapter IV - Investment Management
Article 28. Foreign investors are not allowed to invest in fields that are prohibited from investing in the negative list for foreign investment access.
Foreign investors should meet the conditions stipulated in the negative list to invest in the areas where investment is restricted by the negative list for foreign investment access.
Fields outside the negative list for foreign investment access shall be managed in accordance with the principle of consistency between domestic and foreign investment.
Article 29. Foreign investors who need to go through investment project approval and filing shall follow the relevant state regulations.
Article 30. Foreign investors who invest in industries and fields that require licensing according to law shall go through relevant licensing procedures according to law.
Relevant competent departments shall review foreign investors' applications for permits in accordance with the same conditions and procedures as those for domestic investment, unless otherwise stipulated by laws and administrative regulations.[...]'" (Foreign Investment Law of the People's Republic of China of 15 March 2019, as amended)
------------------------------
"I. The Special Administrative Measures  for Foreign Investment Access (Negative List) (hereinafter referred to as the “Negative List”) uniformly set out special administrative measures for foreign investment access regarding equity requirements and requirements for senior management. Sectors not covered in the Negative List shall be subject to administration in accordance with the principle of equal treatment for domestic and foreign investments.
[...]
III. Overseas investors are forbidden to engage in investment activities as owners of individual businesses, investors of sole proprietorships, or members of farmers’ professional cooperatives. 
[...]
VI. Where the Mainland and Hong Kong Closer Economic Partnership Arrangement and its follow-up agreements, the Mainland and Macao Closer Economic Partnership Arrangement and its follow-up agreements, the Cross-Straits Economic Cooperation Framework Agreement and its follow-up agreements, and any international convention or treaty of which China is a contracting state or to which China has acceded, set out provisions on access treatment for overseas investors that are more preferential, such provisions shall apply. If more preferential opening-up measures are taken for eligible investors in special economic zones such as pilot free trade zones, relevant provisions shall apply. 
[...]
VIII. Leasing and commercial service industry
18. Investment in Chinese legal matters (except for provision of information on the impact of Chinese legal environment) shall be prohibited and foreign investors shall not be the partner of a domestic law firm. [...]" (Special Administrative Measures  for Foreign Investment Access (Negative List) (2021 Edition) )
------------------------------
"Chapter II - License for Legal Practice by Lawyers
Article 5 A person who intends to apply for the legal practice of a lawyer shall meet the following conditions:
(1) upholding the Constitution of the People’s Republic of China;
(2) having passed the unified national judicial examination;
(3) having completed a full year’s internship at a law firm; and
(4) being a person of good character and conduct.
For a person who applies for the legal practice of a lawyer, the lawyer’s qualification certificate he obtained before the unified national judicial examination is instituted shall be equally effective as the qualification certificate obtained after passing the unified national judicial examination.
[...]
Article 13. A person who has not obtained a lawyer’s practice certificate shall not provide legal services in the name of lawyer; and he shall not act as agent ad litem or defender, unless otherwise provided for by Law.
Chapter III - Law Firms
Article 14. A law firm is an organization in which lawyers practice law.
For the establishment of a law firm, the following conditions shall be met: [...]
(3) The person who intends to establish the firm shall be a lawyer who has a good deal of experience in the profession and, in the recent three years, who has not been suspended from legal practice by way of punishment; [...]" (Law of the People's Republic of China on Lawyers of 15 May 1996, as amended [google translation])
------------------------------
"Article 2 These Regulations apply to foreign law firms establishing representative offices in China (hereinafter referred to as representative offices) to engage in legal service activities.
[...]
Chapter II Establishment, Change and Cancellation of Representative Offices
Article 6.　Foreign law firms shall obtain permission from the judicial administrative department of the State Council to establish representative offices and send representatives in China.
Foreign law firms, other foreign organizations or individuals are not allowed to engage in legal service activities in China in the name of consulting companies or otherwise.
[...]
Chapter III Business Scope and Rules
Article 15.　Representative offices and their representatives may only engage in the following activities excluding Chinese legal affairs:
(1) To provide the parties with consultation on the laws of the country where the lawyers of the foreign law firm have been approved to engage in legal practice, as well as consultation on international treaties and international practices;
(2) Accepting the entrustment of the client or the Chinese law firm to handle legal affairs in the country where the lawyers of the foreign law firm have been approved to practice law;
(3) On behalf of foreign parties, entrust Chinese law firms to handle Chinese legal affairs;
(4) To maintain a long-term entrusted relationship with a Chinese law firm to handle legal affairs by signing a contract;
(5) Provide information on the impact of China's legal environment.
According to the agreement reached with the Chinese law firm, the representative office can directly make a request to the lawyers of the entrusted Chinese law firm.
Representative offices and their representatives shall not engage in other legal service activities or other profit-making activities other than those specified in paragraphs 1 and 2 of this Article.
Article 16.　A representative office shall not employ Chinese practicing lawyers; the employed auxiliary personnel shall not provide legal services for the parties concerned. [...]" (Regulations on Administration of Foreign Law Firms' Representative Offices in China of 22.12., as amended [google translation])
Foreign Investment Law of the People's Republic of China of 15 March 2019, as amended
Special Administrative Measures  for Foreign Investment Access (Negative List) (2021 Edition) 
[<a href="http://www.gov.cn/xinwen/2019-03/20/content_5375360.htm">Law</a>],[<a href="https://www.tjftz.gov.cn/tisip/upload/files/2022/4/TheSpecialAdministrativeMeures(NegativeList)forForeignInvestmentAccess(2021Edition).pdf">List</a>],[<a href="http://www.npc.gov.cn/zgrdw/englishnpc/Law/2009-02/20/content_1471604.htm">Law</a>],[<a href="http://www.gov.cn/gongbao/content/2002/content_61860.htm">Reg</a>]