Introduction Current research mainly examines the link between sarcopenia and obstructive spirometry, with limited studies on preserved ratio impaired lung function (PRISm). This study aims to investigate the association between skeletal muscle index (SMI) and lung function indicators in populations with different characteristics, with particular emphasis on the PRISm population. Methods Data were utilized from the National Health and Nutrition Examination Survey (NHANES) 2011-2012 cycle. The participants were categorized into three groups: obstructive spirometry, PRISm, and normal spirometry. The SMI was calculated by dividing appendicular skeletal muscle mass by body mass index. Multiple linear regression analysis was employed to explore the relationship between the SMI and lung function indicators, including forced expiratory volume in 1 second (FEV1) and forced vital capacity (FVC). Results Among the 2513 participants aged 20–59 years, 2096 had normal spirometry, 186 were in the obstructive spirometry group, and 231 were in the PRISm group. The SMI was significantly associated with lung function indicators after adujustment: in the obstructive spirometry group, per 0.1 unit increase in SMI was linked to an increase in FEV1 of 0.214 L (95% CI: 0.115-0.313, p < 0.001) and in FVC of 0.339 L (95% CI: 0.213-0.465, p < 0.001); in the PRISm group, per 0.1 unit increase in SMI was associated with an increase in FEV1 of 0.184 L (95% CI: 0.149-0.219, p < 0.001) and in FVC of 0.222 L (95% CI: 0.169-0.274, p < 0.001); and in the normal spirometry group, per 0.1 unit increase in SMI was linked to an increase in FEV1 of 0.240 L (95% CI: 0.222-0.257, p < 0.001) and in FVC of 0.316 L (95% CI: 0.294-0.338, p < 0.001). Conclusion Our study newly identifies a significant positive association between SMI and lung function in the PRISm group, a relationship also consistently observed in obstructive and normal spirometry groups.