In the post-epidemic era, Masked Face Recognition (MFR) is of great significance to our daily life, but it confronts a severe challenge of lacking real-world large-scale masked face datasets with identity labels. Moreover, mask enhances the diversity of face images and further improves the requirements for datasets. To address the above problem, we propose a novel CycleGAN-based masked face generation method MaskedFace-GAN (MFGAN), which is able to generate correct, authenticlooking and type-diverse masked face while ensuring the invariance of facial features. We design a three-stage training pipeline for MFGAN, which corresponds to three modules, respectively. Specifically, a facial feature detector is adopted to guide the model to generate the correct mask in the correct position. Then, by utilizing a mask binary segmentation module, the authenticity of generated images can be guaranteed. Lastly, with mask style encoder, the model can be optimized towards generating typediverse masked faces. Finally, comparing with advanced masked face synthesis and generation methods comprehensively, our MFGAN achieves the best results. Then we apply the generated masked face datasets to MFR model training, which further proves the feasibility of training MFR models on generated datasets and the effectiveness and advancement of MFGAN compared with other state-of-the-art methods.