Codon bias is an important factor which influences heterologous gene expression. Optimizing codon sequence could improve expression level of heterologous gene. In order to improve the expression level of BmK AngM1 gene encoding the analgesic peptide from Buthus martensii Karsch in Pichia pastoris, the codon-optimized BmK AngM1 gene according to its cDNA sequence and the preference codon usage of P. pastoris were cloned into expression vector pPIC9K and then transformed into P. pastoris. The expersion of recombinant BmK AngM1 (rBmK AngM1) was inducced by methanol in the medium, and the expression level of the optimized BmK AngM1 gene was 3.7 times of the native one. These results suggested that the expression of BmK AngM1 in P. pastoris could be successfully improved by codon optimization.