Ammonia can induce pulmonary fibrosis in humans and animals. Platycodin D (PLD) possesses various bioactive activities including anti-fibrotic properties. In this study, we aimed to explore the activity and mechanism of PLD in pulmonary fibrosis induced by ammonia. The mouse model of ammonia-induced lung fibrosis was established, and the role of PLD was assessed by H&E and Masson's trichrome staining. The differentially expressed genes (DEGs) were identified by RNA-seq and subjected to GO and KEGG pathway analyses. BEAS-2B cells were treated with NH4 Cl alone or along with PLD. Results showed that PLD attenuated ammonia-induced pulmonary inflammation and fibrosis invivo. The extracellular matrix (ECM)-receptor interaction pathway was predicted as a prominent pathway underlying the anti-fibrotic function of PLD. In ammonia-induced mouse models and NH4 Cl-treated BEAS-2B cells, PLD could repress the activation of the TGF-β1 pathway. By incubating lung fibroblast HFL1 cells with the conditioned medium of BEAS-2B cells treated with NH4Cl alone or along with PLD, PLD was confirmed to attenuate NH4 Cl-induced ECM deposition in HFL1 cells. Our findings demonstrate that PLD exerts a protective function in ammonia-induced pulmonary fibrosis by repressing TGF-β1-mediated ECM remodeling, suggesting the potential therapeutic value of PLD in this disease.