Detection of lung nodules is key in the treatment of early-stage lung cancer. Computed tomography (CT) scanning technology is an essential contactless tool. However, stray radiation caused by a patient's slight movements and equipment operation can impair CT images, hindering accurate lung nodule detection. To address these issues, this study proposes an artificial intelligence-based anti-interference lung nodule detection method, which is primarily structured with Yolov8 and combines the modules of adaptive gating sparse attention (AGSA) and haar wavelet downsampling (HWD), referred to as Yolov8-AH. This model aimed to improve the accuracy of lung nodule detection in lung CT images under interference conditions. AGSA focuses on key areas of the image, promoting detection stability even when CT images are disturbed. Furthermore, HWD prioritizes the frequency components corresponding to the size and shape of the nodules, enhancing their visibility for easier detection and analysis. HWD effectively reduces image noise without significantly blurring the lung nodule edges, emphasizing them prominently within the lung tissue. Furthermore, when combined with the Yolov8 deep learning model driven by artificial intelligence, the model could accurately detect lung nodules, significantly aiding in early diagnosis and treatment. The effectiveness of the Yolov8-AH detection model was verified through ablation experiments, experiments under varying noise intensities, and experiments under different noise application ratios. The experimental results demonstrate that, compared to existing lung nodule detection models, the Yolov8-AH model achieves a 24% improvement in mAP50 and an 8.2% improvement in precision.