The relationship between vitamin D deficiency and Pseudomonas aeruginosa (P. aeruginosa) colonization in bronchiectasis patients is not well understood. This study was conducted at Shanghai Pulmonary Hospital from June 2014 to May 2018. Serum 25-hydroxyvitamin D levels were measured in patients with bronchiectasis, and clinical data including sputum culture results were collected. To investigate the relationship between vitamin D levels and P. aeruginosa colonization, we conducted correlation analysis and logistic regression. Additionally, in vitro experiments with bone marrow-derived macrophages (BMDMs) infected with P. aeruginosa strain PAO1 were performed to further explore the influence of vitamin D on the bacterial infection and inflammatory response. Among the 195 patients with bronchiectasis, 83.1% (162/195) were vitamin D deficient. A significant negative correlation was observed between serum vitamin D levels and the BSI (Bronchiectasis Severity Index) score. Patients with vitamin D deficiency showed higher rates of P. aeruginosa colonization compared to those with adequate vitamin D levels. Female gender and vitamin D deficiency were identified as risk factors for P. aeruginosa colonization in patients with bronchiectasis. Additionally, serum interleukin (IL)-1β levels were significantly elevated in the vitamin D-deficiency group. In vitro experiments, 1,25-dihydroxyvitamin D [1,25D] was shown to inhibit PAO1 phagocytosis in BMDMs and to suppress IL-1β secretion. Vitamin D deficiency was strongly associated with an increased risk of P. aeruginosa colonization in patients with bronchiectasis. Furthermore, vitamin D demonstrated protective effects by reducing P. aeruginosa survival in cells and modulating the inflammatory dysregulation induced by the bacterium.