Valve spring of diesel engine is the important components in the valve assembly. Valve spring does not undertake cyclic variable loading at work, but also must overcome the additional load caused the vibration from valves at high speed. The simulated annealing algorithm has become one of the important tools for solving complex optimization problems, because of its intelligence, widely used and global search ability. In order to reduce the impact of the negative inertia force of Valve spring on valve timing in the high-speed movement, and save materials and reduce costs of spring. the objective function should be specified that the mass of a spring inclines to minimum based on meeting allowable strength.