African swine fever (ASF) is an infectious disease of domestic and wild pigs, caused by ASF virus (ASFV). In this study, a triplex real-time PCR assay was developed to detect and differentiate the gene-deleted and wild-type ASFV strains. Three pairs of primers and probes were designed to target the conserved region of B646L gene (p72), MGF_360-14L gene (located in the middle of MGF360-505R gene) and CD2v gene, respectively. Gene-deleted (with MGF360-505R and / or CD2v genes deletion) and wild-type ASFV strains were detected specifically and simultaneously by the assay developed without cross-reactions with other nucleic acids of PCV-2, CSFV, PRRSV, FMDV or SVA. The detection limits of the triplex rPCR were 7.9 copies, 9.7 copies, and 9.6 copies of standard plasmid DNA containing B646L gene, MGF_360-14L gene and CD2v gene, respectively. A total of 1215 field samples were tested in parallel by the triplex rPCR and real-time PCR recommended by OIE, and the B646L gene detection results were completely consistent between these two assays. The triplex rPCR assay was successfully developed to identify pigs infected with wild-type ASFV strains or immunized with the ASFV gene-deleted vaccine.