Aiming at the detecting and tracking of the moving dim target with low SNR, this paper puts forward a new arithmetic of tracking before detecting based on particle filter (TBD-PF). The arithmetic proceeds background suppression with mathematical morphology filter firstly, and then estimates the state of the target using the arithmetic of particle filter. A threshold value is set when sampling newborn particles in the processing of tracking, and it not only improves the quality of particles but also reduces computation cost. The method of the hypothetic test of likelihood ratio is used to decide whether the target exists in the processing of detection. Finally, we obtain the track and detecting probability of the target. The excellent detecting capability and tracking precision of this presented arithmetic are well verified by the results of the simulation which utilizes the realistic infrared images with different SNR.