Tumor heterogeneity presents challenges for personalized diagnosis and treatment of cancer. The identification method of cancer-specific biomarkers has important applications for the diagnosis and treatment of cancer types. In this study, we analyzed the pan-cancer DNA methylation data from TCGA and GEO, and proposed a computational method to quantify the degree of specificity based on the level of DNA methylation of G protein-coupled receptor-related genes (GPCRs-related genes) and to identify specific GPCRs DNA methylation biomarkers (GRSDMs) in pan-cancer. Then, a ridge regression-based method was used to discover potential drugs through predicting the drug sensitivities of cancer samples. Finally, we predicted and verified 8 GRSDMs in adrenocortical carcinoma (ACC), rectum adenocarcinoma (READ), uveal Melanoma (UVM), thyroid carcinoma (THCA), and predicted 4 GRSDMs (F2RL3, DGKB, GRK5, PIK3R6) which were sensitive to 12 potential drugs. Our research provided a novel approach for the personalized diagnosis of cancer and informed individualized treatment decisions.