Lung cancer subtyping, particularly differentiating adenocarcinoma (ADC) from squamous cell carcinoma (SCC), is paramount for clinicians to develop effective treatment strategies. In this study, we aimed: (i) to discover volatile organic compound (VOC) biomarkers for precise diagnosis of ADC and SCC, (ii) to investigated the impact of risk factors on ADC and SCC prediction, and (iii) to explore the metabolic pathways of VOC biomarkers. Exhaled breath samples from patients with ADC (n= 149) and SCC (n= 94) were analyzed by gas chromatography-mass spectrometry. Both multivariate and univariate statistical analysis method were employed to identify VOC biomarkers. Support vector machine (SVM) prediction models were developed and validated based on these VOC biomarkers. The impact of risk factors on ADC and SCC prediction was investigated. A panel of 13 VOCs was found to differ significantly between ADC and SCC. Utilizing the SVM algorithm, the VOC biomarkers achieved a specificity of 90.48%, a sensitivity of 83.50%, and an area under the curve (AUC) value of 0.958 on the training set. On the validation set, these VOC biomarkers attained a predictive power of 85.71% for sensitivity and 73.08% for specificity, along with an AUC value of 0.875. Clinical risk factors exhibit certain predictive power on ADC and SCC prediction. Integrating these risk factors into the prediction model based on VOC biomarkers can enhance its predictive accuracy. This work indicates that exhaled breath holds the potential to precisely detect ADCs and SCCs. Considering clinical risk factors is essential when differentiating between these two subtypes.