Melatonin exerts antimetastatic effects on liver and breast cancer and also inhibits matrix metalloproteinase (MMP) activity. However, the detailed impacts and underlying mechanisms of melatonin on oral cancer cell metastasis are still unclear. This study showed that melatonin attenuated the 12-O-tetradecanoylphorbol-13-acetate-induced migration of oral cancer cell lines, HSC-3 and OECM-1. Zymography, quantitative real-time PCR, and Western blotting analyses revealed that melatonin lessened MMP-9 enzyme activity as well as the expression of MMP-9 mRNA and protein. Furthermore, melatonin suppressed the phosphorylation of the ERK1/2 signalling pathway, which dampened MMP-9 gene transcription by affecting the expression of transcriptional coactivators, such as CREB-binding protein (CREBBP) and E1A binding protein p300 (EP300), and decreasing histone acetylation in HSC-3 and OECM-1 cells. Examinations on clinical samples exhibited that MMP-9, CREBBP, and EP300 were significantly increased in oral cancer tissues. Moreover, the relative level of CREBBP was positively correlated with the expression of MMP-9 and EP300. In conclusion, we demonstrated that melatonin inhibits the motility of HSC-3 and OECM-1 cells in vitro through a molecular mechanism that involves attenuation of MMP-9 expression and activity mediated by decreased histone acetylation.