Particle filtering is a nonlinear and non-Gaussian dynamical filtering system. It has found widespread applications in hydrological data assimilation. In order to solve the loss of particle diversity exiting in resampling process of particle filter, this research proposes an improved particle filter algorithm using genetic algorithm optimization and Gamma test. This method combines the genetic algorithm and Gamma test into the resampling procedure of particle filter to improve the adaptability and performance of particle filter in data assimilation. First, the particles are classified to three different groups based on resampling method. The particles with high weight values remain unchanged. Then genetic algorithm is used to cross and variate the rest of the particles. In the process of the optimization, the Gamma test method is applied for monitoring the quality of the new generated particles. When the gamma statistic stays stable, the algorithm will end the optimization and continue to perturb next observations in particle algorithm. The algorithm is illustrated for the three-dimensional Lorenz model and the much more complex 40-dimensional Lorenz model. The results demonstrate this method can keep the diversity of the particles and enhance the performance of the particle filter, leading to the promising conjecture that the method is applicable to realistic hydrological problems.