Peucedanum decursivum (Miq.) Maxim (P. decursivum) is a traditional Chinese medicinal plant with pharmacological effects such as anti-inflammatory and anti-tumor effects, the root of which is widely used as medicine. Determining the spatial distribution and pharmacological mechanisms of metabolites is necessary when studying the effective substances of medicinal plants. As a means of obtaining spatial distribution information of metabolites, mass spectrometry imaging has high sensitivity and allows for molecule visualization. In this study, matrix-assisted laser desorption mass spectrometry (MALDI-TOF-MSI) and network pharmacology were used for the first time to visually study the spatial distribution and anti-inflammatory mechanism of coumarins, which are metabolites of P. decursivum, to determine their tissue localization and mechanism of action. A total of 27 coumarins were identified by MALDI-TOF-MSI, which mainly concentrated in the cortex, periderm, and phloem of the root of P. decursivum. Network pharmacology studies have identified key targets for the anti-inflammatory effect of P. decursivum, such as TNF, PTGS2, and PRAKA. GO enrichment and KEGG pathway analyses indicated that coumarins in P. decursivum mainly participated in biological processes such as inflammatory response, positive regulation of protein kinase B signaling, chemical carcinogenesis receptor activation, pathways in cancer, and other biological pathways. The molecular docking results indicated that there was good binding between components and targets. This study provides a basis for understanding the spatial distribution and anti-inflammatory mechanism of coumarins in P. decursivum.