Infrared small target detection is an important and core problem in infrared search and track systems. Many infrared small target detection methods work well under the premise of a static background; however, the detection effect decreases seriously when the background changes dynamically. In addition, the spatiotemporal information of the target and background of the image sequence are not fully developed and utilized, lacking long-term temporal characteristics. To solve these problems, a novel long-term spatial–temporal tensor (LSTT) model is proposed in this paper. The image registration technique is employed to realize the matching between frames. By directly superimposing the aligned images, the spatiotemporal features of the resulting tensor are not damaged or reduced. From the perspective of the horizontal slice of this tensor, it is found that the background component has similarity in the time dimension and correlation in the space dimension, which is more consistent with the prerequisite of low rank, while the target component is sparse. Therefore, we transform the problem of infrared detection of a small moving target into a low-rank sparse decomposition problem of new tensors composed of several continuous horizontal slices of the aligned image tensor. The low rank of the background is constrained by the partial tubal nuclear norm (PTNN), and the tensor decomposition problem is quickly solved using the alternating-direction method of multipliers (ADMM). Our experimental results demonstrate that the proposed LSTT method can effectively detect small moving targets against a dynamic background. Compared with other benchmark methods, the new method has better performance in terms of detection efficiency and accuracy. In particular, the new LSTT method can extract the spatiotemporal information of more frames in a longer time domain and obtain a higher detection rate.