Cucumber is a model cucurbitaceous plant with a known genome sequence which is important for studying molecular mechanisms of root development. In this study, RNA sequencing was employed to explore the mechanism of melatonin-induced lateral root formation in cucumber under salt stress. Three groups of seeds were examined, that is, seeds primed without melatonin (CK), seeds primed in a solution containing 10 or 500 μmol/L melatonin (M10 and M500, respectively). These seeds were then germinated in NaCl solution. The RNA-seq analysis generated 16,866,670 sequence reads aligned with 17,920 genes, which provided abundant data for the analysis of lateral root formation. A total of 17,552, 17,450, and 17,393 genes were identified from roots of the three treatments (CK, M10 and M500, respectively). The expression of 121 genes was significantly up-regulated, and 196 genes were significantly down-regulated in M500 which showed an obvious increase on the number of lateral roots. These genes were significantly enriched in 57 KEGG pathways and 16 GO terms (M500 versus CK). Based on their expression pattern, peroxidase-related genes were selected as the candidates to be involved in the melatonin response. Several transcription factor families might play important roles in lateral root formation processes. A number of genes related to cell wall formation, carbohydrate metabolic processes, oxidation/reduction processes, and catalytic activity also showed different expression patterns as a result of melatonin treatments. This RNA-sequencing study will enable the scientific community to better define the molecular processes that affect lateral root formation in response to melatonin treatment.