The receptor tyrosine kinase RET (rearranged during transfection) plays a vital role in various cell signaling pathways and is a critical factor in the development of the nervous system. Abnormal activation of the RET kinase can lead to several cancers, including thyroid cancer and non-small-cell lung cancer. However, most RET kinase inhibitors are multi-kinase inhibitors. Therefore, the development of an effective RET-specific inhibitor continues to present a significant challenge. To address this issue, we built a molecular generation model based on fragment-based drug design (FBDD) and a long short-term memory (LSTM) encoder–decoder structure to generate receptor-specific molecules with novel scaffolds. Remarkably, our model was trained with a molecular assembly accuracy of 98.4%. Leveraging the pre-trained model, we rapidly generated a RET-specific-candidate active-molecule library by transfer learning. Virtual screening based on our molecular generation model was performed, combined with molecular dynamics simulation and binding energy calculation, to discover specific RET inhibitors, and five novel molecules were selected. Further analyses indicated that two of these molecules have good binding affinities and synthesizability, exhibiting high selectivity. Overall, this investigation demonstrates the capacity of our model to generate novel receptor-specific molecules and provides a rapid method to discover potential drugs.