Pathogenic bacteria infection, especially Clostridium perfringens (C. perfringens), markedly threatened the health of animals, and further caused huge economic loss. In this study, Bacillus licheniformis HJ0135 (BL) was used. Oxford cup bacteriostatic test and inhibitory rate test were conducted to evaluate the antibacterial ability of BL. Results showed the strongest inhibitory role of BL on C. perfringens (P < 0.05). Afterwards, 540 one-day-old yellow-feather broilers (32.7 ± 0.2 g) were randomly allocated into 3 groups, including CON group (basal diet), CP group (basal diet + 1 × 109 CFU C. perfringens in gavage), and BL + CP group (basal diet containing 7.5 × 106 CFU/g BL + 1 × 109 CFU C. perfringens in gavage). At d 70, broilers in the CP and BL + CP groups were treated with C. perfringens by continuously oral administration for 5 d. The experiment lasted for 75 d. The serum, immune organs, jejunal mucosa, and cecal contents were collected for analysis. In vivo experiment showed that BL supplementation markedly improved (P < 0.05) BW, ADG, thymus index, serum immunoglobins and antioxidases, reduced feed conversion ratio (FCR) and serum pro-inflammatory cytokines of C. perfringens-infected broilers. Furthermore, the increased jejunal injury and levels of pro-inflammatory cytokines, decreased gene expressions of tight junction proteins in the jejunal mucosa were significantly alleviated (P < 0.05) by BL. More importantly, the activation of NOD-, LRR- and pyrin domain-containing protein 3 (NLRP3) inflammasome was inhibited (P < 0.05) by BL to further attenuate jejunal damage. Besides, BL supplementation markedly increased (P < 0.05) the cecal isobutyric acid and isovaleric acid. Microbial analysis showed that BL changed the composition and relative abundances of microbiota in the cecal contents (P < 0.05), especially the short chain fatty acids (SCFAs)-producing bacteria including Eubacterium_coprostanoligenes_group, Megamonas, Faecalibacterium, and Lactobacillus, which further protected against C. perfringens-induced jejunal inflammation in broilers. Our study laid a theoretical basis for the application of probiotics in lessening C. perfringens-related diseases in poultry farming.