We designed and demonstrated experimentally a silicon photonics integrated dynamic polarization controller which is a crucial component of a continuous-variable quantum key distribution system. By using a variable step simulated annealing approach, we achieve a dynamic polarization extinction ratio greater than 25 dB. The dynamic polarization controller can be utilized in silicon photonics integrated continuous-variable quantum key distribution system to minimize the size and decrease the cost further.