Fetal electrocardiogram signal extraction is of great significance for perinatal fetal monitoring. In order to improve the prediction accuracy of fetal electrocardiogram signal, this paper proposes a fetal electrocardiogram signal extraction method (GA-LSTM) based on genetic algorithm (GA) optimization with long and short term memory (LSTM) network. Firstly, according to the characteristics of the mixed electrocardiogram signal of the maternal abdominal wall, the global search ability of the GA is used to optimize the number of hidden layer neurons, learning rate and training times of the LSTM network, and the optimal combination of parameters is calculated to make the network topology and the mother body match the characteristics of the mixed signals of the abdominal wall. Then, the LSTM network model is constructed using the optimal network parameters obtained by the GA, and the nonlinear transformation of the maternal chest electrocardiogram signals to the abdominal wall is estimated by the GA-LSTM network. Finally, using the non-linear transformation obtained from the maternal chest electrocardiogram signal and the GA-LSTM network model, the maternal electrocardiogram signal contained in the abdominal wall signal is estimated, and the estimated maternal electrocardiogram signal is subtracted from the mixed abdominal wall signal to obtain a pure fetal electrocardiogram signal. This article uses clinical electrocardiogram signals from two databases for experimental analysis. The final results show that compared with the traditional normalized minimum mean square error (NLMS), genetic algorithm-support vector machine method (GA-SVM) and LSTM network methods, the method proposed in this paper can extract a clearer fetal electrocardiogram signal, and its accuracy, sensitivity, accuracy and overall probability have been better improved. Therefore, the method could extract relatively pure fetal electrocardiogram signals, which has certain application value for perinatal fetal health monitoring.