In time-varying groundwater remediation problem, the lack of an optimal control algorithm to simultaneously consider fixed costs and time-varying operating costs makes it nearly impossible to obtain an optimal solution. This study presents a novel algorithm that integrates Genetic Algorithm (GA) and Constrained Differential Dynamic Programming (CDDP) to solve this time-varying groundwater remediation problem. GA can easily incorporate the fixed costs associated with the installation of a well. However, using GA to solve for time-varying policies would dramatically increase the computational resources required. Therefore, the CDDP is used to handle the sub-problems associated with time-varying operating costs. Consequently, the CDDP is embedded into the GA. A case study that incorporates fixed and time-varying operating costs is also presented to demonstrate the effectiveness of the proposed algorithm. Simulation results indicate that the proposed algorithm can reduce the total cost of time-varying groundwater remediation problem by 68.39% when using only CDDP. By doing so, the minimal total cost (consisting of fixed and time-varying operating costs) can be calculated. Copyright ASCE 2004.