In addition to smoking, dietary habits may contribute to the development of chronic obstructive pulmonary disease (COPD). This study aimed to examine the association between dietary patterns and lung function in a Korean community cohort. A total of 5436 participants were included from the Ansan–Ansung cohort study. To identify the dietary patterns, we performed principal component factor analysis using the results of a semi-quantitative food frequency questionnaire. The forced expiratory volume in 1 s (FEV1), forced vital capacity (FVC), and FEV1/FVC ratio were measured by spirometry. Multiple logistic regression models were used to evaluate the association between dietary patterns and lung function after adjusting for confounders. We identified four major dietary patterns; ‘prudent’, ‘coffee, fat, and sweet’, ‘westernized’, and ‘white rice’. After adjusting for potential confounders, the ‘coffee, fat, and sweet’ dietary pattern was negatively associated with lung function, particularly the FEV1/FVC ratio. Participants with high scores for the ‘coffee, fat and sweet’ pattern had a higher risk of COPD among men but not women. Therefore, these results indicate that the ‘coffee, fat and sweet’ dietary pattern is inversely related to lung function in Korean adults. Our results indicate that dietary habits may be modifiable risk factors for COPD.