The study focuses on the potential function of dexamethasone on ropivacaine in sciatic nerve blocks. Nine Sprague–Dawley (SD) rats were randomly divided into three groups: normal group (NG), control group (CG), and experimental group (EG), with three rats in each group. The CG was injected with diluted ropivacaine (0.5% concentration); the EG was injected with a diluted ropivacaine+dexamethasone mixture, and the NG was injected with an equal amount of saline. The sciatic nerve in the thigh was collected for sequencing two days after injection in each group. Differential analysis was performed for NG-vs-CG, NG-vs-EG, and CG-vs-EG based on the sequencing dataset. The modular genes associated with ropivacaine and ropivacaine+ dexamethasone were screened by weighted coexpression network analysis (WGCNA), differentially expressed modules among them were enriched for analysis, and protein-protein interaction (PPI) networks were constructed to observe high and low expression among key genes in immune cells. Twenty-two and three differential genes associated with ropivacaine (green-yellow module) and ropivacaine+dexamethasone (palevioletred3 module) were acquired, respectively, which played important roles in biological processes such as erythrocyte homeostasis, erythroid differentiation, and hemoglobin metabolic processes. PPI revealed that AHSP, ALAS2, EPB42, HBB, and SLC4A1 were interacting and the expression of these five genes was upregulated in the CG compared with the NG, while the expression of them was downregulated in the EG compared with the CG. The immunological analysis also showed significant differences in the expression of various immune cells in the 3 groups. AHSP, ALAS2, EPB42, HBB, and SLC4A1 are genes associated with hemoglobin, and dexamethasone combined with ropivacaine may prolong anesthesia by affecting local vasoconstriction to some extent.