Calcium-dependent protein kinase (CDPK or CPK) and CDPK-related kinase (CRK) play an important role in plant growth, development, and adaptation to environmental stresses. However, their gene families had been yet inadequately investigated in Medicago truncatula. In this study, six MtCRK genes were computationally identified, they were classified into five groups with MtCDPKs based on phylogenetic relationships. Six pairs of segmental duplications were observed in MtCDPK and MtCRK genes and the Ka/Ks ratio, an indicator of selection pressure, was below 0.310, indicating that these gene pairs underwent strong purifying selection. Cis-acting elements of morphogenesis, multiple hormone responses, and abiotic stresses were predicted in the promoter region. The spatial expression of MtCDPKs and MtCRKs displays diversity. The expression of MtCDPKs and MtCRKs could be regulated by various stresses. MtCDPK4, 14, 16, 22, and MtCRK6 harbor both N-myristoylation site and palmitoylation site and were anchored on plasma membrane, while MtCDPK7, 9, and 15 contain no or only one N-acylation site and were distributed in cytosol and nucleus, suggesting that the N-terminal acylation sites play a key role in subcellular localization of MtCDPKs and MtCRKs. In summary, comprehensive characterization of MtCDPKs and MtCRKs provide a subset of candidate genes for further functional analysis and genetic improvement against drought, cold, salt and biotic stress.