Objective. Suanzaoren Decoction (SZRT) is a classic decoction to calm the nerves in traditional Chinese medicine (TCM). It has been extensively treated as an antianxiety drug in modern times, but the material basis and pharmacological mechanisms are still unclear. To explore the material basis and corresponding potential targets, as well as to elucidate the mechanism of SZRT, network pharmacology and molecular docking methods were utilized. Methods. The main chemical compounds and potential targets of SZRT were collected from the pharmacological database analysis platform (TCMSP). Anxiety targets were obtained from the GeneCards database. Then, a target compound network was established using overlapping genes and the corresponding potential compounds. Protein interaction analysis, GO enrichment, and KEGG pathway enrichment were performed using the STRING database, DAVID database, and KOBAS database. Finally, molecular docking was conducted between MAOB and its corresponding active compound in SZRT to further verify the results. Results. A total of 137 active components in SZRT were screened from the TCMSP database, and 210 corresponding targets were predicted. A total of 5434 anxiety-related targets were obtained from the disease target database, and finally 22 potential targets of SZRT on antianxiety were obtained. The constructed C-T network showed that the average degree of active components was 5.4, and four of them interacted with six or more targets. PPI analysis shows that key genes such as MAOA, MAOB, IL1B, TNF, NR3CI, and HTR3A were identified as potential therapeutic targets. A pathway analysis showed that SZRT may participate in neurotransmitter regulation and immunoregulation in a synergistic way to treat anxiety. The binding energy between the active compounds and MAOB was low, indicating good binding. The results of molecular docking showed that all the 10 active ingredients were able to successfully dock with MAOB, and the binding energy of coumaroyltyramine with MAOB was the lowest, that is, −9.6 kcal/mol, and the binding method was hydrogen bonding. Conclusions. SZRT produces antianxiety effects mainly by affecting the neurotransmitter release, transmission, and immunoregulation. This study provides a new approach to elucidating the molecular mechanism and material basis of SZRT in the treatment of anxiety, and it will also benefit the application of TCM in modern medicine.