In recent years, significant progress has been made in intelligent fault diagnosis algorithms for rolling bearings. However, their real industrial application performance is hindered by challenges related to noise and variable load conditions. To solve this problem, we proposed an adaptive denoising convolutional neural network (ADCNN) which integrates adaptive denoising units to remove noise while preserving sensitive fault features, eliminating the need for manual denoising function settings. In addition, we use Maximum Overlap Discrete Wavelet Packet Transform to separate out the interfering components of noisy signal. To further improve ADCNN's noise immunity, we adopt a strategy of gradually decreasing the number of channels and using large convolutional kernels. ADCNN was evaluated alongside the latest methods on two different datasets, and the results demonstrate that ADCNN outperforms other methods both accuracy and robustness. Therefore, our approach presents a promising solution for diagnosing mechanical systems in noisy environments.