Clematis is the queen of the vines, being an ornamental plant with high economic value. Waterlogging stress reduces the ornamental value of the plant and limits its application. Melatonin plays an important role in plant resistance to abiotic stresses. In this study, the physiological responses and gene expression levels of two wild species, namely, Clematis tientaiensis and Clematis lanuginosa, and two horticultural varieties, namely, ‘Sen-No-Kaze’ and ‘Viva Polonia,’ under waterlogging stress were analyzed to determine the effect of melatonin on waterlogging tolerance. The results showed that the waterlogging tolerances of C. lanuginosa and ‘Sen-No-Kaze’ were relatively poor, but were significantly improved by concentrations of 100 μmol·L-1 and 50 μmol·L-1 melatonin. C. tientaiensis and ‘Viva Polonia’ had relatively strong tolerance to waterlogging, and this was significantly improved by 200 μmol·L-1 melatonin. Under waterlogging stress, the relative conductivity and H2O2 content of Clematis increased significantly; the photosynthetic parameters and chlorophyll contents were significantly decreased; photosynthesis was inhibited; the contents of soluble protein and soluble sugars were decreased. Effective improvement of waterlogging tolerance after exogenous melatonin spraying, the relative conductivity was decreased by 4.05%-27.44%; the H2O2 content was decreased by 3.84%-23.28%; the chlorophyll content was increased by 35.59%-103.36%; the photosynthetic efficiency was increased by 25.42%-45.86%; the antioxidant enzyme activities of APX, POD, SOD, and CAT were increased by 28.03%-158.61%; the contents of proline, soluble protein, and soluble sugars were enhanced, and cell homeostasis was improved. Transcription sequencing was performed on wild Clematis with differences in waterlogging tolerance, and nine transcription factors were selected that were highly correlated with melatonin and that had the potential to improve waterlogging tolerance, among which LBD4, and MYB4 were significantly positively correlated with the antioxidant enzyme system, and bHLH36, DOF36, and WRKY4 were significantly negatively correlated. Photosynthetic capacity was positively correlated with DOF36 and WRKY4 while being significantly negatively correlated with MYB4, MOF1, DOF47, REV1 and ABR1. Melatonin could enhance the flooding tolerance of Clematis by improving photosynthetic efficiency and antioxidant enzyme activity. This study provides an important basis and reference for the application of melatonin in waterlogging-resistant breeding of Clematis.