Due to the large changes in dynamic image sequence frames and the complex detection scene, it is difficult to accurately detect moving objects. Therefore, the study proposes a moving target detection algorithm based on artificial neural network. First, the algorithm performs standardized grayscale processing and gamma correction processing on the dynamic image to eliminate the noise interference of the dynamic image. After that, the model calculates the gradient of the dynamic image in order to complete the feature extraction of the dynamic image. Then, according to the result of hog feature extraction, the study adopts the inter-frame calculation method to update the background of the dynamic image. Finally, the principle and structure of the neural network are analyzed experimentally, and a channel attention mechanism is introduced to train dynamic image sequences to obtain MTD results. Experimental results show that the proposed algorithm achieves higher accuracy in MTD than conventional detection algorithms. The calculation efficiency of the algorithm in this paper has significant advantages, and the average detection time is 3.69515ms, which can meet the real-time requirements of MTD.