Idiopathic pulmonary fibrosis is a fatal, incurable lung disease in which the intricate alveolar network of the human lung is progressively replaced by fibrotic scars, eventually leading to respiratory failure. Myofibroblasts are the effector cells that lead to abnormal deposition of extracellular matrix proteins and therefore mediate fibrotic disease not only in the lung but also in other organs. Emerging literature suggests a correlation between fibrosis and metabolic alterations in IPF. In this study, we show that the first-line antidiabetic drug, metformin, exerts potent antifibrotic effects in the lung by modulating metabolic pathways, inhibiting TGFβ1 action, suppressing collagen formation, activating PPARγ signaling and inducing lipogenic differentiation in lung myofibroblasts derived from human patients. Using genetic lineage tracing in a murine model of lung fibrosis, we show that metformin alters the fate of myofibroblasts and accelerates fibrosis resolution by inducing myofibroblast-to-lipofibroblast transdifferentiation. Detailed pathway analysis showed that the reduction of collagen synthesis was largely AMPK-dependent, whereas the transdifferentiation of myo- to lipofibroblasts occurred in a BMP2-PPARγ-dependent fashion and was largely AMPK-independent. Our data report an unprecedented role for metformin in lung fibrosis, thus warranting further therapeutic evaluation.