“Jiang Ge case” and“Yao Jiaxin case” are two typical cases in which public opinion on the Internet has a certain impact on the judiciary. The attitude of Internet public opinion towards the two cases reflects the difference between law and morality, and the importance of the principle of judicial independence in judicial activities. This paper tries to find a balance mechanism between Internet public opinion and judicature by comparing and analyzing the different views of internet public opinion and legal person in the two cases and the causes of public opinion in China and Japan. In the framework of harmonious judicature, we can realize the harmonious coexistence of network public opinion and judicature by means of improving judicial credibility, absorbing public opinion reasonably and establishing good spirit of rule of law.