African swine fever virus (ASFV) causes African swine fever (ASF), a devastating hemorrhagic disease of domestic pigs and wild boars. Currently, the MGF505R, EP402R (CD2v) and I177L gene-deleted ASFV strains were confirmed to be the ideal vaccine candidate strains. To develop an assay for differentiating the wild-type and gene-deleted ASFV strains, four pairs of specific primers and TaqMan probes targeting the ASFV B646L (p72), I177L, MGF505-2R and EP402R (CD2v) genes were designed. A multiplex real-time qPCR assay for the differential detection of the wild-type and gene-deleted ASFV strains was developed after optimizing the reaction conditions, including the annealing temperature, primer concentration and probe concentration. The results showed that the multiplex real-time qPCR assay can specifically test the ASFV B646L (p72), I177L, MGF505-2R and EP402R (CD2v) genes with a limit of detection (LOD) of 32.1 copies/μL for the B646L (p72) gene, and 3.21 copies/μL for the I177L, MGF505-2R and EP402R (CD2v) genes. However, the assay cannot test for the classical swine fever virus (CSFV), porcine reproductive and respiratory syndrome virus (PRRSV), porcine epidemic diarrhea virus (PEDV), porcine deltacoronavirus (PDCoV), porcine circovirus type 2 (PCV2), PCV3 and pseudorabies virus (PRV). The assay demonstrated good repeatability and reproducibility with coefficients of variation (CV) less than 1.56% for both the intra- and inter-assay. The assay was used to test 4239 clinical samples, and the results showed that 12.60% (534/4239) samples were positive for ASFV, of which 10 samples lacked the EP402R gene, 6 samples lacked the MGF505-2R gene and 14 samples lacked the EP402R and MGF505-2R genes. The results indicated that the multiplex real-time qPCR developed in this study can provide a rapid, sensitive and specific diagnostic tool for the differential detection of the ASFV B646L, I177L, MGF505-2R and EP402R genes.