Monilinia is the causal agent of brown rot in stone fruit. The three main species that cause this disease are Monilinia laxa, M. fructicola, and M. fructigena, and their infection capacity is influenced by environmental factors (i.e., light, temperature, and humidity). To tolerate stressful environmental conditions, fungi can produce secondary metabolites. Particularly, melanin-like pigments can contribute to survival in unfavorable conditions. In many fungi, this pigment is due to the accumulation of 1,8-dihydroxynaphthalene melanin (DHN). In this study, we have identified for the first time the genes involved in the DHN pathway in the three main Monilinia spp. and we have proved their capacity to synthetize melanin-like pigments, both in synthetic medium and in nectarines at three stages of brown rot development. The expression of all the biosynthetic and regulatory genes of the DHN-melanin pathway has also been determined under both in vitro and in vivo conditions. Finally, we have analyzed the role of three genes involved in fungi survival and detoxification, and we have proved that there exists a close relationship between the synthesis of these pigments and the activation of the SSP1 gene. Overall, these results deeply describe the importance of DHN-melanin in the three main species of Monilinia: M. laxa, M. fructicola, and M. fructigena.