Yanhusuo (Corydalis Rhizoma) extracts are widely used for the treatment of pain and inflammation. The effects of Yanhusuo in pain assays were assessed in a few studies. However, there are few studies on its analgesic mechanism. In this paper, network pharmacology was used to explore the analgesic components of Yanhusuo and its analgesic mechanism. The active components of Yanhusuo were screened by TCMSP database, combined with literature data. PharmMapper and GeneCards databases were used for screening the analgesic targets of the components. The protein interaction network diagram was drawn by String database and Cytoscape software, the gene ontology and KEGG pathway analyses of the target were performed by DAVID database, and the component-target-pathway interaction network diagram was further drawn by Cytoscape3.6.1 software. System Dock Web Site verified the molecular docking among components and targets. Finally, an interaction network of the component-target-pathway of Yanhusuo was constructed, and the functions and pathways were analyzed for preliminarily investigating the mechanism of Yanhusuo in analgesia. The results showed that the active components of analgesic in Yanhusuo were Corynoline, dehydrocorydaline, saulatine,2,3,9,isoquinolin-8-on-e, and Capaurine. The mechanisms were involved in metabolic pathways, PI3k-Akt signaling pathway, pathways in cancer, and so on. The top 3 targets were NOS3, glucose-6-phosphate dehydrogenase, and glucose-6-phosphate isomerase in components-target-pathways network, and they were all enriched in metabolic pathways. Meanwhile the molecular docking showed that there was a high binding activity between the 6 components and the important target proteins, as a further certification for the subsequent network analysis. This study reveals the relationship of the components, targets, and pathways of active components in Yanhusuo, and provides new ideas and methods for further research on the analgesic mechanism of Yanhusuo.