How to fit a properly nonlinear classification model from conventional well logs to lithofacies is a key problem for machine learning methods. Kernel methods (e.g., KFD, SVM, MSVM) are effective attempts to solve this issue due to abilities of handling nonlinear features by kernel functions. Deep mining of log features indicating lithofacies still needs to be improved for kernel methods. Hence, this work employs deep neural networks to enhance the kernel principal component analysis (KPCA) method and proposes a deep kernel method (DKM) for lithofacies identification using well logs. DKM includes a feature extractor and a classifier. The feature extractor consists of a series of KPCA models arranged according to residual network structure. A gradient-free optimization method is introduced to automatically optimize parameters and structure in DKM, which can avoid complex tuning of parameters in models. To test the validation of the proposed DKM for lithofacies identification, an open-sourced dataset with seven conventional logs (GR, CAL, AC, DEN, CNL, LLD, and LLS) and lithofacies labels from the Daniudi Gas Field in China is used. There are eight lithofacies, namely clastic rocks (pebbly, coarse, medium, and fine sandstone, siltstone, mudstone), coal, and carbonate rocks. The comparisons between DKM and three commonly used kernel methods (KFD, SVM, MSVM) show that (1) DKM (85.7%) outperforms SVM (77%), KFD (79.5%), and MSVM (82.8%) in accuracy of lithofacies identification; (2) DKM is about twice faster than the multi-kernel method (MSVM) with good accuracy. The blind well test in Well D13 indicates that compared with the other three methods DKM improves about 24% in accuracy, 35% in precision, 41% in recall, and 40% in F1 score, respectively. In general, DKM is an effective method for complex lithofacies identification. This work also discussed the optimal structure and classifier for DKM. Experimental results show that (m1,m2,0) is the optimal model structure and linear SVM is the optimal classifier. (m1,m2,0) means there are m1 KPCAs, and then m2 residual units. A workflow to determine an optimal classifier in DKM for lithofacies identification is proposed, too.