Shigella flexneri is the major Shigella species that causes diarrheal disease in developing countries. It is further subdivided into 15 serotypes based on O-antigen structure. Serotyping of S. flexneri is important for epidemiological purposes. In this study, we developed a multiplex PCR assay targeting the O-antigen synthesis gene wzx and the O-antigen modification genes gtrI, gtrIC, gtrII, oac, gtrIV, gtrV, and gtrX for molecular serotyping of S. flexneri. The multiplex PCR assay contained eight sets of specific PCRs in a single tube and can identify 14 of the 15 serotypes (the exception being serotype Xv) of S. flexneri recognized thus far. A nearly perfect concordance (97.8%) between multiplex PCR assay and slide agglutination was observed when 358 S. flexneri strains of various serotypes were analyzed, except that 8 strains were carrying additional cryptic and/or defective serotype-specific genes. The multiplex PCR assay provides a rapid and specific method for the serotype identification of S. flexneri.