There is a lack of evidence for longitudinal microbiota changes during treatment in nontuberculous mycobacterial pulmonary disease (NTM-PD). We aimed to investigate the changes in microbiome during treatment period using bacterial microbiome from sputum samples of NTM-PD patients. We analyzed 53 sputum samples of 14 NTM-PD patients. Sputum samples were collected from patients at treatment start date, 1, 3, 6, and 12 months later. The analysis included two M. avium (14.3%), seven M. intracellulare (50.0%), two M. massiliense (14.3%), and three patients (21.4%) with mixed infections. Compared to the treatment start date, species richness decreased at all points after 1, 3, 6, and 12 months of treatment, and diversity index also decreased at after 1 and 3 months of treatment. Species-level and genus-level showed differences compared to the treatment start date (PERMANOVA all p < 0.05 except genus-level after 12 months). Taxonomic biomarkers analysis using linear discriminant analysis effect sizes (LEfSe) demonstrated that several species and genera were distributed differently based on the treatment progress. Especially, Pseudomonas aeruginosa group had greater abundance at 12 months after treatment (p = 0.022). On the Contrary, Haemophilus influenza group was abundant at the treatment start date, but significantly decreased after treatment (p < 0.001). Of the 14 patients, 5 (35.7%) were patients with refractory NTM-PD. In refractory NTM-PD, LEfSe showed an increase in Pseudomonas aeruginosa group abundance at 12 months of treatment, which was not observed in patients with non-refractory NTM-PD. In conclusion, diversity and dominant species differed according to the treatment.