In visual tracking, the target's environment has a significant influence on the tracking result. To solve this problem, we propose a sparse representation model based on the elastic net and design an anti-jamming visual tracking algorithm under the particle filter framework. To overcome the influence of light change and other disturbances on the tracking result, we develop a method to dynamically update sparse representation model parameters according to the environment change. Besides, using the anisotropic kernel function to calculate the probability that each candidate region is the tracking target's location, the proposed algorithm improves the tracking algorithm's accuracy. Furthermore, we improve the dictionary template updating method to ensure the accuracy and timeliness of template updating and ensure the tracking quality. Experimental results show that compared with other tracking algorithms, the dynamic elastic network tracking algorithm proposed has a better tracking effect under disturbance, such as illumination. Moreover, the algorithm can virtually guarantee tracking accuracy under occlusion and fast motion.