Background Porcine circovirus type 2 (PCV2), is nowadays associated with a number of diseases known as porcine circovirus-associated diseases (PCVAD), especially postweaning multisystemic wasting syndrome (PMWS). The epidemiological investigation of PCV2 infection was usually conducted by PCR, nested PCR, PCR-RFLP, TaqMan-based assay and nucleotide sequencing. However, there is still no rapid, sensitive and practical method for detecting PCV2 genotypes. As a novel nucleic acid amplification method, the loop-mediated isothermal amplification method (LAMP) has been used to detect a variety of pathogenic microorganisms. Results Herein, a LAMP method is developed to detect the genotypes of PCV2. The diagnostic sensitivity of LAMP is 1 copy/reaction for differentiating genotypes PCV2a and PCV2b. The reaction process was completed at 65°C for 1 hour in a water bath. Cross-reactivity assay shows that this method is specific for PCV2a and PCV2b and no reactive for PCV2c and other swine-origin viruses (i.e. CSFV, PRRSV, BVDV, TGEV and PEDV, etc). Identity between LAMP and nested PCR was 92.3% on 52 field clinical samples. Conclusions LAMP method provides a rapid, sensitive, reliable way to detect PCV2a and PCV2b, and a better means for the large scale investigation of PCV2a and PCV2b infection.