Early-life exposures may influence lung function at different stages of the life course. However, the relative importance of characteristics at different stages of infancy and childhood are unclear. To examine the associations and relative importance of early-life events on lung function at age 24 years. We followed 7545 children from the Avon Longitudinal Study of Parents and Children from birth to 24 years. Using previous knowledge, we classified an extensive list of putative risk factors for low lung function, covering sociodemographic, environmental, lifestyle and physiological characteristics, according to timing of exposure: 1) demographic, maternal and child; 2) perinatal; 3) postnatal; 4) early childhood; and 5) adolescence characteristics. Lung function measurements (forced vital capacity (FVC), forced expiratory volume in 1 s (FEV1), FEV1/FVC and forced expiratory flow at 25-75% of FVC) were standardised for sex, age and height. The proportion of the remaining variance explained by each characteristic was calculated. The association and relative importance (RI) of each characteristic for each lung function measure was estimated using linear regression, adjusted for other characteristics in the same and previous categories. Lower maternal perinatal body mass index (BMI), lower birthweight, lower lean mass and higher fat mass in childhood had the largest RI (0.5-7.7%) for decreased FVC. Having no siblings, lower birthweight, lower lean mass and higher fat mass were associated with decreased FEV1 (RI 0.5-4.6%). Higher lean mass and childhood asthma were associated with decreased FEV1/FVC (RI 0.6-0.8%). Maternal perinatal BMI, birthweight, childhood lean and fat mass and early-onset asthma are the factors in infancy and childhood that have the greatest influence on early-adult lung function.