Melatonin is a pleiotropic signaling molecule that regulates plant growth and responses to various abiotic stresses. The last step of melatonin synthesis in plants can be catalyzed by caffeic acid O-methyltransferase (COMT), a multifunctional enzyme reported to have N-acetylserotonin O-methyltransferase (ASMT) activity; however, the ASMT activity of COMT has not yet been characterized in nonmodel plants such as watermelon (Citrullus lanatus). Here, a total of 16 putative O-methyltransferase (ClOMT) genes were identified in watermelon. Among them, ClOMT03 (Cla97C07G144540) was considered a potential COMT gene (renamed ClCOMT1) based on its high identities (60.00–74.93%) to known COMT genes involved in melatonin biosynthesis, expression in almost all tissues, and upregulation under abiotic stresses. The ClCOMT1 protein was localized in the cytoplasm. Overexpression of ClCOMT1 significantly increased melatonin contents, while ClCOMT1 knockout using the CRISPR/Cas-9 system decreased melatonin contents in watermelon calli. These results suggest that ClCOMT1 plays an essential role in melatonin biosynthesis in watermelon. In addition, ClCOMT1 expression in watermelon was upregulated by cold, drought, and salt stress, accompanied by increases in melatonin contents. Overexpression of ClCOMT1 enhanced transgenic Arabidopsis tolerance against such abiotic stresses, indicating that ClCOMT1 is a positive regulator of plant tolerance to abiotic stresses.