Long-term detection and evaluation of electrocardiogram (ECG) signals is crucial for the diagnosis and prevention of cardiovascular disease. However, the detection of ECG signals usually needs to install electrodes on the patient, which can easily cause discomfort to the subject, and the scope of application is thus limited. In contrast, pulse wave signals detected by photoplethysmography (PPG) not only contains rich cardiovascular physiological and pathological information, but also is easy to be measured. Considering the inherent mapping relationship between PPG and ECG signals, a model of transferring PPG to ECG signals based on generative adversarial network (GAN) is proposed. The generator network is composed of the Unet model, the structure of Unet++ is referenced in the feature map fusion, and the discriminator network is composed of a convolutional neural network. During the training process, gradient penalty is utilized to increase the stability of the model. The experiment is conducted based on public datasets. By comparing the processing results of a sample of 53 subjects, the root mean square error (RMSE), Pearson correlation coefficient (ρ) and Fréchet distance (FD) of the ECG signal generated by the new model are improved by 3.4%, 5.5% and 0.4%, respectively, proving that the new model has better PPG-ECG transfer effect.