The aim of this study is to identify calcium dependent protein kinases (CDPKs) superfamily genes (including calcium dependent protein kinase (CDPK) genes, CDPK-related kinase (CRK) genes, and phosphoenolpyruvate carboxylase kinase-related kinase (PEPRK) genes) and to analyze their expression in response to high calcium, bicarbonate, and water deficit in Medicago lupulina. Transcriptome sequencing databases and bioinformatics were used to identify CDPK superfamily genes. qRT-PCR analyses were used to study the expression of CDPK superfamily genes in response to high calcium, bicarbonate, water deficit, and their combined treatments. Ten MlCDPKs, four MlCRKs, and two MlPEPRKs genes were identified from transcriptome sequencing databases. The identified MlCDPK superfamily genes could be divided into six subgroups including CDPK I, CDPK II, CDPK III, CDPK IV, CRK, and PEPRK according to evolutionary relationships. Analysis of protein structure indicated that MlCDPK proteins contained a protein kinase domain and EF-hand domain. However, PEPRKs contained only a protein kinase domain while CRKs contained also degenerative EF-hands. Most of the MlCDPK superfamily genes were differentially expressed in different organs. According to their expression levels, MlCDPK superfamily genes such as MlCDPK1, MlCDPK9, and MlCDPK10 were more sensitive in response to individual treatments of high calcium, carbonate or PEG rather than their combination of treatments. The results indicated that MlCDPK superfamily genes may play an important role in response to those stresses. These results provide important insight into the role of CDPKs in M. lupulina, especially in the tolerance to Karst habitats, where high calcium and carbonate and drought conditions are the dominant ecological limiting factors.