The high-amplitude shear wave in the z-component of ocean-bottom node (OBN) data challenges conventional seismic data imaging and interpretation. The process of shear-wave attenuation from the z-component data can be regarded as a coherent noise reduction problem. However, conventional noise attenuation methods, such as filtering or matching and subtraction, are time-consuming or have limited accuracy for field data processing. Unlike conventional methods with indirect feature recognition, pretrained neural networks provide end-to-end denoising frameworks by directly predicting and subtracting the shear-wave-free data from the original z-component data. Here, we have developed a deep learning-based method to address the shear-wave leakage problem and adopted a training set generation strategy based on the field data. Denoised z-component data are not needed to train the network. The generation of the training set and the extraction of noise features are based on the data of the x- and p-components. A residual learning strategy is introduced to extract the noise from the field data other than those in the training set. Synthetic examples confirm the excellent performance of our training set generation strategy. Field 4C OBN examples show that our method can attenuate shear-wave noise without harming the signals and, therefore, can be integrated into multicomponent field data processing.