Fruits are important horticultural commodities because they provide nutrients that help human health. Fruits are mostly consumed as fresh products; however, there are challenges in retaining the freshness, such as the rapid ripening process that triggers fruit deterioration and reduces fruit quality and nutrient content. The postharvest quality of horticultural crops is affected by pre-and postharvest treatment. Most farmers use chemical compounds and fungicides to prevent postharvest damage; however, this results in health hazards and environmental pollution. Melatonin can be used for maintaining and improving postharvest horticultural crops such as fruits. Melatonin is a new bioactive compound that is a potent free radical scavenger and antioxidant. It has been studied as an alternative to harmful chemicals used commercially in the postharvest management of fresh products. For human health, melatonin plays a regulatory role in circadian and seasonal rhythms, sleep, retinal functions, and the immune system. In plants, melatonin regulates many biological processes, particularly when plants have experienced abiotic stress, germination, aging, and growth. The effect of exogenous melatonin on fruit ripening has focused primarily on the relationship between melatonin and ethylene plant hormones. Many studies in recent years have discussed melatonin’s role in plants, particularly in delaying plant aging as an alternative way of increasing fruit shelf life. This review provides a comprehensive overview of melatonin biosynthesis in plants, factors that affect the content of melatonin in fruit, melatonin mechanisms in fruit ripening, the impact of melatonin on postharvest fruit quality, the effect of melatonin on postharvest quality, and the change in metabolite content of horticultural products, particularly fruits.