Idiopathic pulmonary fibrosis (IPF) is a fatal interstitial lung disease associated with disruption of alveolar epithelial cell layer and expansion of fibroblasts/myofibroblasts. Excessive levels of oxidative/nitrosative stress, induction of apoptosis, and insufficient autophagy may be involved in IPF pathogenesis; hence, the targeting of these pathways may ameliorate IPF. Areas covered: We describe the ameliorative effect of melatonin on IPF. We summarize the research on IPF pathogenesis with a focus on oxidative/nitrosative stress, autophagy and apoptosis pathways and discuss the potential effects of melatonin on these pathways. Expert opinion: Oxidative/nitrosative stress, apoptosis and autophagy could be interesting targets for therapeutic intervention in IPF. Melatonin, as a potent antioxidant, induces the expression of antioxidant enzymes, scavenges free radicals and modulates apoptosis and autophagy pathways. The effect of melatonin in the induction of autophagy could be an important mechanism against fibrotic process in IPF lungs. Further clinical studies are necessary to determine if melatonin could be a candidate for treating IPF.