Fetal electrocardiogram (FECG) signals directly reflect the electrical activity of the fetal heart, enabling the assessment of fetal cardiac health. To effectively separate and extract FECG signals from maternal abdominal electrocardiogram (ECG) signals, this study proposed a W-shaped parallel network, termed Attention R2W-Net, which consisted of two Attention R2U-Nets. In the encoder and decoder, recurrent residual modules were used to replace feedforward convolutional layers, significantly enhancing feature representation and improving noise suppression. Additionally, attention gates were used to replace skip connections, enabling precise correction of low-resolution features using deep features and further improving model performance. The decoders at both ends of the network were utilized to reconstruct FECG and MECG signals, respectively. The algorithm was validated using simulated and real datasets, achieving F1 scores of 99.17%, 98.03%, and 97.08% on the ADFECGDB, PCDB, and NIFECGDB datasets, respectively, demonstrating superior performance in both subjective visual effects and objective evaluation metrics. Attention R2W-Net's ability to extract robustly and accurately FECG signals, even in complex noisy environments, make it a reliable tool for FECG extraction. The proposed method's efficiency and accuracy highlight its potential for widespread clinical application, contributing to improved early diagnosis of fetal cardiac abnormalities.