Resonance frequency shift and vibration amplitude instability can occur during the operation processes of photoelastic modulators in atomic magnetometers, resulting in low driving efficiency and unstable modulation amplitudes. To solve these problems, a dual closed-loop drive and control system for photoelastic modulators based on a field-programmable gate array has been developed, which includes a resonance tracking loop and a phase modulation amplitude stabilization loop. According to the relationship between the photoelastic modulator's resonance frequency and the phase difference of its voltage and current, a resonance tracking strategy based on a direct digital synthesizer can automatically track the photoelastic modulator's resonance frequency. A proportional integral derivative controller is used to stabilize the modulation amplitude. The experimental results demonstrate that the designed system is effective, since it is able to lock the phase difference at 1.0209° with a maximum deviation of 0.0036° and has a 7.7% higher modulation amplitude stability performance than that of a commercial controller over 60 min. This can improve the performance of photoelastic modulation detection systems in atomic magnetometers. In particular, the designed system is flexible, efficient and adaptable because of the softwarebased control algorithm.