Malignant melanoma is a highly metastatic cancer, and has a poor prognosis once metastasis has occurred. E-cadherin downregulation is associated with a poorer prognosis in various types of cancer, including lung, ovarian, cervical and prostate. In the majority of cancer cell lines, E-cadherin upregulation inhibits cell motility, migration and invasiveness, and reduces tumor metastasis in in vivo models. In the present study, the inhibitory effects of metformin on the motility, invasion and migration of the B16F10 murine melanoma cell line, and the possible molecular mechanisms underlying this effect were investigated. B16F10 cells were treated with various concentrations of metformin for 24 h and their motility, migration and invasion were tested using a wound-healing assay, a migration assay and a matrigel invasion assay, respectively. Furthermore, the expression of E-cadherin was measured by immunocytochemistry, western blotting and reverse transcription-quantitative polymerase chain reaction. The results showed that metformin effectively upregulated the expression of E-cadherin, and inhibited B16F10 cell motility, migration and invasion, in a dose-dependent manner. This suggested that the inhibition of motility, migration and invasion of B16F10 cells by metformin may be associated with the upregulation of E-cadherin expression, indicating that metformin may have a role in the treatment of melanoma.