Idiopathic pulmonary fibrosis (IPF) is a fatal disease in which the intricate alveolar network of the lung is progressively replaced by fibrotic scars. Myofibroblasts are the effector cells that excessively deposit extracellular matrix proteins thus compromising lung structure and function. 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 fibroblasts derived from IPF 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 revealed a two-arm mechanism by which metformin accelerates fibrosis resolution. Our data report an antifibrotic role for metformin in the lung, thus warranting further therapeutic evaluation.