The depressant β toxin anti-neuroexcitation peptide (ANEP) from the Chinese scorpion Buthus martensii Karsch has analgesic activity by interacting with receptor site 4 of the voltage-gated sodium channels (VGSCs). Here, with molecular dynamics simulations, we examined the binding modes between ANEP and the site 4 of mice sodium channel 1.7 (mNav1.7), a subtype of VGSCs related to peripheral pain. Homology modeling, molecular mechanics, and molecular dynamics in the biomembrane environment were adopted. The results suggested that ANEP bound to the resting site 4 mainly by amino acid residues in the β2–β3 loop and the ‘NC’ domains, and the activate site 4 mainly by amino acid residues in the hydrophobic domain of N-groove and residues in the ‘pharmacophore’. Effects analysis of 14 mutants in the predicted functional domains of ANEP on mouse twisting models showed that the analgesic activity of mutants L15 and E24 of the ‘pharmacophore’, W36, T37, W38, and T39 forming the loop between the β2- and β3-strands and N8, V12, C60, and K64 in the NC domain increased distinctly after these residues were substituted for Ala, respectively. The binding modes and the active sites predicted were consistent with available mutagenesis data, and which is meaningful to understand the related mechanisms of ANEP for Nav1.7.