Waveform optimization technology based on phase encoding has become a key technology to improve the ability of radar to detect small targets. Designing different phase encoding models for different application scenarios and platforms can effectively improve the performance of radar in complex environments such as clutter and interference. Therefore, it's very important to design an optimization algorithm with high orthogonality and fast convergence. This paper proposes an improved dynamic genetic algorithm to solve the optimization problem of Multi-Input Multi-Output radar phase encoding signal set. By improving the optimization model of the genetic algorithm, the diversity of the population is quantified to prevent the algorithm from converging prematurely. The improved dynamic genetic algorithm reduces the genetic probability of inferior individuals in the selection operation, then proposes to update the crossover probability in the crossover operation, and finally designs the mutation probability for individual gene points in the mutation operation, which solves the key problem of poor diversity in existing algorithms question. The simulation results show that the improved dynamic genetic algorithm improves the population diversity, optimizes the convergence speed of the algorithm, and the optimized phase encoding set has good performance, and the result is better than the existing improved genetic algorithm.