This paper presents a new method of dynamic sub-population genetic algorithm combined with modified dynamic penalty function to solve constrained optimization problems. The new method ensures the final optimal solution yields all constraints through re-organizing all individuals of each generation into two sub-populations according to the feasibility of individuals. And the modified dynamic penalty function gradually increases the punishment to bad individuals with the development of the evolution. With the help of the penalty function and other improvements, the new algorithm prevents local convergence and iteration wandering fluctuations. Typical instances are used to evaluate the optimizing performance of this new method; and the result shows that it can deal with constrained optimization problems well.