Premature birth, bronchopulmonary dysplasia or restrictive nutrition in the first weeks of postnatal life may have repercussions on lung development and affect long-term lung function outcomes. This prospective observational study is based on a cohort of 313 very low birth weight (VLBW) neonates, born between 1 January 2008 and 1 December 2016. The daily intake of calories, protein, fat and carbohydrates during the first week of life and evidence of inadequate weight gain (Δwt) until week 36 of gestational age (GA) were recorded. FEV1, FEF25–75 %, forced vital capacity (FVC) and the FEV1/FVC ratio were determined. The relations between these parameters were determined by regression analysis. Spirometric parameters were obtained for 141 children with a mean age of 9 years (95 % CI 7, 11); 69 of them (48·9 %) had presented wheezing episodes on more than three occasions. In addition, 60 (42·5 %) had a history of bronchopulmonary dysplasia. Of these, n 40 (66·6 %) had a history of wheezing. Significant association between protein/energy intake in the first week of life and the lung function parameters analysed was observed. Poor Δwt to GA week 36 was significantly associated with decreased mean pulmonary flow. Inadequate protein/energy intake in the first week of life of VLBW newborns and poor Δwt to week 36 of GA is associated with a significant worsening of lung function parameters.