A real-time fluorescent polymerase chain reaction (PCR) assay was established to detect Streptococcus suis serotype 2. Primers and Taqman probe were designed according to cps2I (capsular polysaccharide 2I) gene using bio-software Primer Express2.0 and Oligo6.0. An 81 bp DNA fragment was amplified from S. suis serotype 2 genomic DNA, and the PCR product was cloned into pMD18-T vector and confirmed by DNA sequencing. The real-time fluorescent PCR amplification curve on a Lightcycler® showed that the method is accurate and specific for S. suis serotype 2 amplification, whereas reference bacteria S. suis, Escherichia coli, Salmonella sp., Staphylococcus aureus, Shigella sp., Listeria monocytogenes strains and a blank control were all negative. Tenfold serial dilutions of S. suis serotype 2 were used to measure the sensitivity of real-time fluorescent PCR: ten copies of bacteria could be detected in one PCR reaction and only 30 min were required for a single test. To examine the stability of the real-time fluorescent PCR, the positive control was detected at two different times. The threshold cycle (Ct) values showed no statistical differences (P>0.05). Thus, this method was stable and repeatable. These results indicate that this real-time fluorescent PCR technique could be applied for epidemic supervision in entry–exit inspection and quarantine.