Lung cancer is the deadliest cancer worldwide. Correct diagnosis of lung cancer is one of the main tasks that is challenging tasks, so the patient can be treated as soon as possible. In this research, we proposed a hybrid model based on convolutional neural networks (CNN) and fuzzy kernel k-medoids (FKKM) for lung cancer detection, where the magnetic resonance imaging (MRI) images are transmitted to CNN, and then the output is used as new input for FKKM. The dataset used in this research consist of MRI images taken from someone who had lung cancer with the treatment of anti programmed cell death-1 (anti-PD1) immunotherapy in 2016 that obtained from the cancer imaging archive. The proposed method obtained accuracy, sensitivity, precision, specificity, and F1-score 100% by using radial basis function (RBF) kernel with sigma of {10<sub></sub><sup>-8</sup>, 10<sub></sub><sup>-4</sup>, 10<sub></sub><sup>-3</sup>, 5x10<sub></sub><sup>-2</sup>, 10<sub></sub><sup>-1</sup>, 1, 10<sup>4</sup>} in 20-fold cross-validation. The computational time is only taking less than 10 seconds to forward dataset to CNN and 3.85 ± 0.6 seconds in FKKM model. So, the proposed method is more efficient in time and has a high performance for detecting lung cancer from MRI images.