Returning to China in 1939, Li became
Associate Professor of Law at the
National Wuhan University, at the time relocated to
Leshan,
Sichuan due to the
Second Sino-Japanese War. Later in 1941, Li was promoted to
Professor of Law and Head of the Faculty of Law. At the end of the
World War II Li Haopei left for
Hangzhou, where he became Professor of Law and Dean of the College of Law at the
National Chekiang University. Following the end of the
Chinese Civil War in 1949, Li moved to
Beijing, where he served the
Communist government as an Expert Commissioner to the National Law Commission of China up to 1956. In that year, he was made Professor of International Law at the College of Foreign Relations. From 1963 to 1993, Li was concurrently Professor of International Law at
Peking University and Legal Advisor to the Ministry of Foreign Affairs of the
People's Republic of China (PRC). In 1979, he completed drafting the first Criminal Law of the People's Republic of China and the Law of Criminal Procedure, a key piece of legislation enacted as part of a return to legality under the
Open Door Policy. Li Haopei translated a number of works from
English,
German, and
French, including the
Napoleonic Code. ==International tribunals==