Heterakis gallinarum is one of the common parasitic nematodes found in the caecum of poultry. To investigate the genetic diversity and genetic structure of the H. gallinarum population in Sichuan, we amplified and sequenced the complete mitochondrial (mt) cytochrome c oxidase subunit II (cox2) gene of 59 H. gallinarum isolates from seven different geographical regions, then analyzed their genetic polymorphisms. All cox2 genes of the 59 H. gallinarum isolates were 696 bp in length, with an average A + T content of 67.1%. Fifty-nine sequences contained 34 variable sites, and were classified into 23 haplotypes (HS1-HS23). The values of haplotype diversity (Hd) and nucleotide diversity (π) were 0.688 and 0.00288, respectively. Based on values of F and Nm (F = 0.01929, Nm = 12.71), there was a frequent gene flow but no significant genetic differentiation observed among the populations. The network map showed that the most prominent haplotype was HS1, and the other haplotypes (HS2-HS23) were centered on HS1 with a star-like topology, indicating that H. gallinarum had previously experienced a population expansion. To our knowledge, this is the first research on the population genetics of H. gallinarum based on mitochondrial cox2.