Idiopathic pulmonary fibrosis (IPF) is a fatal condition that reduces life expectancy and shows a limited response to available therapies. Pirfenidone has been approved for treatment of IPF, but little is known about the distinct metabolic changes that occur in the lung upon pirfenidone administration.Here, we performed a proof-of-concept study using high-resolution quantitative matrix-assisted laser desorption/ionisation Fourier-transform ion cyclotron resonance mass spectrometry imaging (MALDI-FTICR-MSI) to simultaneously detect, visualise and quantify in situ endogenous and exogenous metabolites in lungs of mice subjected to experimental fibrosis and human patients with IPF, and to assess the effect of pirfenidone treatment on metabolite levels.Metabolic pathway analysis and endogenous metabolite quantification revealed that pirfenidone treatment restores redox imbalance and glycolysis in IPF tissues, and downregulates ascorbate and aldarate metabolism, thereby likely contributing to in situ modulation of collagen processing. As such, we detected specific alterations in metabolite pathways in fibrosis and, importantly, metabolic recalibration following pirfenidone treatment.Together, these results highlight the suitability of high-resolution MALDI-FTICR-MSI for deciphering the therapeutic effects of pirfenidone and provide a preliminary analysis of the metabolic changes that occur during pirfenidone treatment in vivo These data may therefore contribute to improvement of currently available therapies for IPF.