Objective To establish a machine learning-based risk prediction model of combined chronic obstructive pulmonary disease (COPD) with lung cancer, so as to explore the high risk factors for COPD patients with lung cancer and to lay the foundation for early detection of lung cancer risk in COPD patients. Methods A total of 154 patients from the Second Hospital of Dalian Medical University from 2010 to 2021 were retrospectively analyzed, including 99 patients in the COPD group and 55 patients in the COPD with lung cancer group. the chest high resolution computed tomography (HRCT) scans and pulmonary function test of each patient were acquired. The main analyses were as follow: (1) to valid the statistically differences of the basic information (such as age, body mass index, smoking index), laboratory test results, pulmonary function parameters and quantitative parameters of chest HRCT between the two groups; (2) to analyze the indicators of high risk factors for lung cancer in COPD patients using univariate and binary logistic regression (LR) methods; and (3) to establish the machine learning model (such as LR and Gaussian process) for COPD with lung cancer patients. Results Based on the statistical analysis and LR methods, decreased BMI, increased whole lung emphysema index, increased whole lung mean density, and increased percentage activity of exertional spirometry and prothrombin time were risk factors for COPD with lung cancer patients. Based on the machine learning prediction model for COPD with lung cancer patients, the area under the receiver operating characteristic curve for LR and Gaussian process were obtained as 0.88 using the soluble fragments of prothrombin time percentage activity, whole lung emphysema index, whole lung mean density, and forced vital capacity combined with neuron-specific enolase and cytokeratin 19 as features. Conclusion The prediction model of COPD with lung cancer patients using a machine learning approach can be used for early detection of lung cancer risk in COPD patients.