Keteleeria davidiana var. calcarea is an endangered plant endemic to China. It is mainly distributed in the karst areas of the Guangxi and Guizhou Provinces. It is characterized by small populations and intermittent distribution. This study aimed to explore the genetic diversity and mating system of wild populations of Keteleeria davidiana var. calcarea in fragmented habitats. To achieve this, we genotyped 46 maternal trees and 214 progenies from four fragmented populations of Keteleeria davidiana var. calcarea using nine pairs of microsatellite primers. The genetic diversity of Keteleeria davidiana var. calcarea (Ho = 0.68, He = 0.63) was lower than that of the species overall but higher than that of other Keteleeria plants. The incidence of unbiased expected heterozygosity (uHe) and allelic richness (Ar) was higher in the maternal generation than in the progeny. This suggests that the genetic diversity of the progeny was lower than that of the maternal generation. Keteleeria davidiana var. calcarea is divided into four populations, but there is significant genetic exchange between the populations according to STRUCTURE and gene flow analyses. The multilocus mating system analysis (MLTR) results indicate that the multilocus outcrossing rate (tm) was 0.902, the single-locus outcrossing rate (ts) was 0.606, the bimaternal inbreeding coefficient (tm-ts) was 0.295, and the coefficient of inbreeding depression(δ) was 0.904. These results suggest a certain degree of selfing and inbreeding in Keteleeria davidiana var. calcarea. To prevent problems associated with inbreeding and conserve the genetic diversity of Keteleeria davidiana var. calcarea, we recommend establishing seed gardens, using artificial pollination, and employing asexual propagation techniques for conservation intervention.