Illumination-integrated nonuniformity (IINU) is a key factor in determining resolution and critical dimension uniformity, which are important performance parameters in advanced lithography systems. To further reduce the IINU, a uniformity correction technology was adopted. In this paper, a low-cost and simple-structure approach for uniformity correction with higher flexibility and better correction capability is proposed. The method is composed of two dynamic gray filters with a specific transmittance distribution, which can form different correction curves by controlling the displacement of the gray filters. The frequency limitation of the defocus uniformity correction system is analyzed. A uniformity correction system design method based on the particle swarm optimization algorithm is introduced. Based on the proposed method, a dynamic gray filter uniformity correction system is applied to an illumination optical system. The experimental results show that the value of the corrected IINU reaches less than 0.7%, which satisfies the IINU requirements of advanced lithography systems. This verifies the higher flexibility and better correction capability of the proposed method.