The present disclosure discloses use of a rice OsPR6 gene or a protein encoded thereby in regulating resistance of rice to Magnaporthe oryzae, and relates to the technical field of prevention and treatment of rice blast. A CDS nucleotide sequence of the rice OsPR6 gene is shown in SEQ ID NO. 2. A study finds that the rice gene OsPR6 plays an important role in a resistance process of rice to rice blast. The gene may be used for screening to obtain a rice plant line resistant to Magnaporthe oryzae, or the protein encoded thereby may be used as a drug for preventing and treating rice blast。