Rice spotted-leaf mutants serve as valuable resources for studying plant programmed cell death (PCD) and disease resistance mechanisms, making them crucial for research on disease resistance in rice. Map-based cloning was used to identify and clone the spotted-leaf gene OsSPL42. Then, functional complementation and CRISPR/Cas9 techniques were also employed to further validate the function of this gene. By applying leaf clippings for bacterial blight (BB) inoculation, the BB resistance of different rice lines was assessed. The results in this study were as follows: The OsSPL42 behaved as a recessive nuclear gene and was narrowed down to a 111 kb region on chromosome 8. All T0 transgenic rice plants in the complementation experiments exhibited a wild-type phenotype, without any lesion spots on the rice leaves. This suggests that the LOC_Os08g06100 encoding O-methyltransferase is the candidate gene for the mutant spl42. The OsSpl42 is widely expressed and the OsSPL42-GFP protein is mainly localized in the cytoplasm. OsSPL42 overexpression lines are more susceptible to BBs, which indicates that OsSPL42 may act as a negative regulator of rice resistance to BB. In summary, we speculate that OsSPL42 plays an important role in the regulation of pathogen response, providing new insights into plant defense mechanisms.