Melon is a recalcitrant plant for stable genetic transformation. Various protocols have been tried to improve melon transformation efficiency; however, it remains significantly low compared to other plants such as tomato. In this study, the primary focus was on the optimization of key parameters during the inoculation and co-culture steps of the genetic transformation protocol. Our results showed that immersing the explants in the inoculation medium for 20 min significantly enhanced transformation efficiency. During the co-culture step, the use of filer paper, 10 mM 2-(N-morpholino)-ethanesulfonic acid (MES), and a temperature of 24 °C significantly enhanced the melon transformation efficiency. Furthermore, the impact of different ethylene inhibitors and absorbers on the transformation efficiency of various melon varieties was explored. Our findings revealed that the use of these compounds led to a significant improvement in the transformation efficiency of the tested melon varieties. Subsequently, using our improved protocol and reporter-gene construct, diploid transgenic melons successfully generated. The efficiency of plant genetic transformation ranged from 3.73 to 4.83%. Expanding the scope of our investigation, the optimized protocol was applied to generate stable gene-edited melon lines using the Clustered regularly interspaced short palindromic repeats/CRISPR-associated protein 9 (CRISPR/Cas9)-mediated cytosine base editor and obtained melon lines with editions (C-to-T and C-to-G) in the eukaryotic translation initiation factor 4E,CmeIF4Egene. In conclusion, the optimized melon transformation protocol, along with the utilization of the CRISPR/Cas9-mediated cytosine base editor, provides a reliable framework for functional gene engineering in melon. These advancements hold significant promise for furthering genetic research and facilitating crop improvement in this economically important plant species.