Salinity stress is a type of abiotic stress which negatively affects the signaling pathways and cellular compartments of plants. Melatonin (MT) has been found to be a bioactive compound that can mitigate these adverse effects, which makes it necessary to understand the function of MT and its role in salt stress. During this study, plants were treated exogenously with 100 µM of MT for 7 days and subjected to 200 mM of salt stress, and samples were collected after 1 and 7 days for different indicators and transcriptome analysis. The results showed that salt reduced chlorophyll contents and damaged the chloroplast structure, which was confirmed by the downregulation of key genes involved in the photosynthesis pathway after transcriptome analysis and qRT-PCR confirmation. Meanwhile, MT increased the chlorophyll contents, reduced the electrolyte leakage, and protected the chloroplast structure during salt stress by upregulating several photosynthesis pathway genes. MT also decreased the H2O2 level and increased the ascorbic acid contents and APX activity by upregulating genes involved in the ascorbic acid pathway during salt stress, as confirmed by the transcriptome and qRT-PCR analyses. Transcriptome profiling also showed that 321 and 441 DEGs were expressed after 1 and 7 days of treatment, respectively. The KEGG enrichment analysis showed that 76 DEGs were involved in the photosynthesis pathway, while 35 DEGs were involved in the ascorbic acid metabolism pathway, respectively. These results suggest that the exogenous application of MT in plants provides important insight into understanding MT-induced stress-responsive mechanisms and protecting Brassica campestris against salt stress by regulating the photosynthesis and ascorbic acid pathway genes.