Ulcerative colitis (UC) is a chronic inflammatory bowel disease of the colonic mucosa. Esculetin is a type of natural coumarin that has many pharmacological activities such as antioxidant, anticancer, anti-inflammatory, etc. A previous study showed that esculetin improved intestinal inflammation and reduced serum proinflammatory cytokines in UC. The present study aimed to utilize network pharmacology and molecular docking to explore the potential mechanism of esculetin against UC. The potential gene targets of esculetin were predicted through SwissTargetPrediction and Super-PRED web servers. UC-related genes were obtained from DisGeNet, OMIM, and GeneCards databases. The overlap between gene targets of esculetin and UC-related genes were identified as the potential targets of esculetin against UC. The interaction between these overlapping genes was analyzed by the STRING database and the core genes were identified by Cytoscape platform. Gene Ontology and Kyoto Encyclopedia of Genes and Genomes pathway enrichment analysis of the core genes were then performed. And the results of these analyses were further confirmed through molecular docking. A total of 50 overlapping genes were identified as the potential action targets of esculetin against UC. Among them, 10 genes (AKT1, STAT1, CCND1, SRC, PTGS2, EGFR, NFKB1, ESR1, MMP9, SERPINE1) were finally identified as the core genes. The Kyoto Encyclopedia of Genes and Genomes pathway enrichment analysis results showed that the top signaling pathway associated with the core genes of esculetin against UC was the prolactin (PRL) signaling pathway. Molecular docking results showed that esculetin has a strong binding affinity to the core genes, as well as PRL and prolactin receptor. This study suggests that esculetin may have a crucial impact on UC through the PRL signaling pathway and provides insights into the potential mechanism of esculetin in the treatment of UC, which may shed light on the mechanism and treatment of UC.