Idiopathic pulmonary fibrosis (IPF) is the most common interstitial lung disease. However, the pathogenesis remains to be fully elucidated. Melatonin is secreted by the pineal gland, it has a strong antioxidant effect, and exerts an anti-fibrosis effect. Whether melatonin attenuates pulm -onary fibrosis by inhibiting epithelial‑mesenchymal transition (EMT) requires further research. The present study aimed to investigate whether melatonin prevents transforming growth factor‑β1 (TGF‑β1)‑induced EMT and underlying signaling pathways using reverse transcription‑quantitative polymerase chain reaction, western blot analysis and immunofluorescence. The results demonstrated that melatonin inhibits EMT in A549 cells, and the Wnt/β‑catenin and Smad2/3 signaling pathways are involved in the EMT of the A549 cell line as they were suppressed by melatonin. The present study indicates that melatonin inhibited TGFβ1‑induced epithelial‑mesenchymal transition in the A549 cell line and may potentially be useful in the treatment of IPF.