Porcine bocavirus (PBoV) is a recently discovered, non-enveloped and single-stranded DNA virus that can infect pigs. In order to understand PBoV infection and its genetic characterization in piglets in Xinjiang China, PBoV was detected by PCR in 156 clinical samples from 1-month-old piglets. PBoV was detected in 9 clinical samples, with a prevalence rate of 5.77% (9/156). Then nonstructural protein NS1 gene was amplified, sequenced and used for phylogenetic analysis. The results showed that the prevalence rate in the sick piglets was 9.33% (7/75), which is significantly higher than that in the healthy piglets (2.47%, 2/81). The nucleotide sequences of NS1 gene share high identities (96.1-99.2%) within the same groups of PBoVs. Phylogenetic analysis based on complete nucleotide sequence of NS1 gene showed that PBoV strains can be classified into three genetic groups, among which group I contains PBoV1 strains, group II contains PBoV2 strains, and group III contains PBoV3, PBoV4 and PBoV5 strains. Porcine/XJ-12, porcine/XJ-27, porcine/XJ-65, and porcine/XJ-145 had close genetic distance with subgroup 1, belonging to group I; strains porcine/XJ-79 and porcine/XJ-134 were clustered with subgroup 2, belonging to group II, while porcine/XJ-8, porcine/XJ-52 and porcine/XJ-96 were clustered with subgroup 3, which belonged to group III. This study demonstrated for the first time that PBoV strains in Xinjiang belong to three subgroups of three different genetic groups, indicating a substantial genetic diversity of the epidemic strains circulating in China, which provided the useful epidemiological data for scientific control and prevention of this disease in farm pigs.