Objective To explore the relationship between nasopharyngeal microecology and diseases in children with bronchial asthma. Methods A total of 41 children with asthma who were treated in Hainan Provincial Hospital of Traditional Chinese Medicine between November 2020 and March 2023 were retrospectively included in the study, and 26 healthy children undergoing adenoid examination in the same period were selected as the control group. Samples of nasal mucosa were collected from the anterior and medial side of inferior turbinate, and the expression of DEFB2, IL17A, TSLP, IL13, IL5 and T1R3 genes was analyzed by polymerase chain reaction. Nasal swabs were collected from the children, and the bacterial composition was analyzed by 16S ribosomal RNA gene sequencing. Results Compared with the control group, the rate of atopy cases in the asthma group increased significantly (53.7% vs. 19.2%, P<0.05). At the phylum level, compared with the control group, the phylum Chloroflexi, the phylum Patescibacteria, the phylum Tenericutes and the phylum Nitrospirae in the asthma group increased significantly (P<0.05), and the phylum Elusimicrobia decreased significantly (P<0.05). At the genus level, compared with the control group, the members of Bacillus (Fimnicutes), Ruminococcus (Fimnicutes), Rhodococcus (Actinobacteria), Acinetobacter (Proteobacteria), Moraxella (Proteobacteria) and Asaia (Proteobacteria) in the asthma group increased significantly (P<0.05), and the members of Enterococcus (Fimnicutes), Alkanindiges (Proteobacteria), Rickettsia (Proteobacteria), and Rhizobium (Proteobacteria) in the asthma group decreased significantly (P<0.05). Compared with the control group, the Shannon index of the asthma group decreased significantly (2.63±1.45 vs. 3.90±1.44; t=2.708, P=0.010). According to receiver operating characteristic curve analysis, the optimal cut-off point of Shannon index was 3.10. In all study populations, compared with children whose Shannon index was higher than the cut-off point, children whose Shannon index was lower than the cut-off point were characterized by increased expression of IL17A and T1R3 (P<0.05) and decreased expression of TSLP (P<0.05). Conclusion The composition and abundance of nasopharyngeal microbiota are significantly different between children with asthma and healthy control children.