Radar systems with anti-jamming capability have become extremely important in the complex electromagnetic environment. In this paper, an anti-jamming strategy generation method based on deep Q-network (DQN) is proposed for slope-varying linear frequency modulation (SV-LFM) signals. First, the radar-jammer confrontation scenario is modeled as a Markov decision process. Subsequently, a reward function is designed by combining the positive reward for suppressing interference and the negative reward for constraining pulse width. In particular, the positive reward is decided by the correlation peak between the jamming and target signals, and the negative reward is determined by the signal energy and the probability of the signal being intercepted. Following the obtained anti-jamming strategy, radar systems can suppress jamming while also avoiding low signal-to-noise ratio (SNR) and high signal interception probability caused by drastic variations in pulse widths. The simulation results verify the effectiveness of the proposed method.