Light scattering is a main factor that restricts optical transmission and deteriorates optical imaging performance. All-optical imaging for moving targets through complex scattering media is one of the most challenging techniques. In this paper, a method for real-time tracking of moving targets through scattering medium is presented by utilizing optical memory-effect and autocorrelation of speckle difference. In the experiment on imaging through a scattering medium, an object is hidden at a distance u behind a highly scattering medium. The object is illuminated by a spatially incoherent pseudothermal light source. The light is diffused through the scattering medium. Camera placed at a distance u0 on the other side of the medium records the pattern of the scattered light. According to the theory of optical memory-effect, the process of scattering imaging is a convolution process of point spread function (PSF) and object. In the procedure of object moving, the scattered signals from two frames are captured. The background noise could be removed by subtracting the two captured image. Then, the autocorrelation operation calculates the speckle difference, and hidden targets can be effectively reconstructed with the phase retrieval algorithm. The experiment demonstrates the imaging of targets with different speeds. The results have shown that the faster the speed, the worse the imaging quality is. High-speed moving objects can be imaged by using a high frame rate camera to reduce the exposure time or by disambiguating the speckle pattern. In subsequent experiments, the distance of the target movement is calculated with the magnification of the system. The collected two frames of speckle must be within the same memory effect angle. Only in this way can the calculation accuracy of the motion distance be guaranteed. With the moving of the target, the cross-correlation information of the target appears at different positions of the speckle difference autocorrelation map. Finally, according to the cross-correlation of the target at different locations, the real-time tracking of the moving target can be realized. Due to the Gaussian distribution of the laser beam, the cross-correlation intensity of the speckle difference autocorrelation map decreases with the object moving further. Therefore the target moving range is limited by the laser beam diameter, intensity distribution and camera field angle. It is verified experimentally that the imaging and tracking of moving targets which are hidden behind the ground glass can be achieved successfully by using this method. This kind of imaging and real-time tracking technology for targets moving through the scattering medium has important potential applications in biomedicine and other fields.