The diamondback moth, Plutella xylostella is a notorious pest and has developed serious resistance to insecticides. Entomopathogenic fungi (EPF) have been developed as eco-friendly alternatives to insecticides. Insects rely on their immunity to defend against fungi. MicroRNAs are critical regulators of insect immunity. The roles of miRNAs in P. xylostella immunity against fungi remain uncertain. In this study, high-throughput sequencing was conducted to identify miRNAs involved in P. xylostella immunity against EPF Isaria cicadae. A total of 432 miRNAs were identified, and 80 differentially expressed miRNAs (DEMs) were identified in the larvae infected with I. cicadae. Among these DEMs, 77 were predicted to target 290 genes related to immunity. miR8523 was confirmed to specifically target PxSpz5 by bioinformatics, RNA pull-down and dual-luciferase reporter assay. PxSpz5 interacted with PxToll. Knockdown of PxSpz5 enhanced the susceptibility of P. xylostella to I. cicadae. Injection with a miR8523 mimic significantly reduced PxSpz5 expression, and increased the susceptibility of P. xylostella to fungus infection. Collectively, miR8523 played a critical role in P. xylostella immunity against I. cicadae by targeting PxSpz5. This study provides insights into the abundance of miRNAs involved in insect immunity, and also promotes the development of new pest control strategies.