Melatonin (MT) plays important roles in plant disease response, but the mechanisms are largely unknown. Here, we show that MT functions in stomatal immunity in Panax notoginseng and Arabidopsis thaliana. Biochemical analyses showed that MT-induced stomatal closure plays a prominent role in preventing invasion of bacteria Pseudomonas syringe pv. tomato (Pst) DC3000 via activation of mitogen-activated protein kinase (MAPK) and NADPH oxidase-mediated reactive oxygen species production in P. notoginseng. The first putative phytomelatonin receptor 1 (PMTR1) is a plasma membrane protein required for perceiving MT signaling in stomatal closure and activation of MAPK. Biochemical and genetic tests found PMTR1 is essential for flg22- and MT-induced MAPK activation in a heterotrimeric GTP-binding protein Gα subunit GPA1-independent manner. GPA1 functions in the same genetic pathways of FLS2/BAK1 (Flagellin Sensing 2/Brassinosteroid Insensitive 1-associated kinase 1)- as well as PMTR1-mediated flg22 and MT signaling in stomatal closure. The stomata in pmtr1 are insensitive to MT and flg22, but the application of MT induces stomatal closure and reduces the bacterial growth in fls2 and bak1 plants, indicating that PMTR1 might be a downstream signaling component in FLS2- and BAK1-mediated stomatal immunity. In summary, our results (i) demonstrate that phytomelatonin functions in the priming of stomatal immunity and (ii) provide insights into the phytomelatonin signaling transduction pathway.