Non-typeable Hemophilus Influenzae (NTHi) is a common pathogen that can cause a range of respiratory infections, including children pneumonia. However, NTHi can also be found in the upper respiratory tracts of healthy individuals and may not cause any symptoms. The transition of NTHi from a commensal to a pathogenic state is still not well understood. In this study, we aimed to investigate the genomic differences between NTHi isolated from healthy children and those with acute or chronic community-acquired pneumonia (CAP) to better understand the mechanisms underlying this transition. Genomic differences between NTHi isolated from the nasopharynx swabs of healthy children and the bronchoalveolar lavage fluids of children with acute or chronic community-acquired pneumonia (CAP) were analyzed and compared. The study used bGWAS (Bacterial Genome-Wide Association Study) analysis to identify phenotype convergence genes among the three groups and conducted gene enrichment, antibiotic resistance, and virulence factor analyses. Findings showed heterogeneity in the NTHi genomes among the three groups, and various phenotype transition genes that represent the evolution from a healthy to an acute or chronic clinical phenotype were identified. Multiple pathways were found to be involved in the pathogenicity and chronic adaptation of NTHi, including metabolism, synthetic, mismatch repair, glycolysis, and gluconeogenesis. Furthermore, the analysis indicated that antibiotic resistance genes against cephalosporin were commonly present in NTHi isolated from acute and chronic pneumonia patients. Overall, this genomic analysis of NTHi offers promising contributions toward precise clinical diagnosis and treatment.