The management of persistent postoperative pain still remains a clinical challenge currently. Although ropivacaine (RVC) is widely used for postoperative analgesia as a local anesthetic, the short half-life makes it difficult to achieve the desired duration of analgesia. Herein, a novel RVC sustained-release microspheres encapsulated by zeolite imidazole framework-8 (RVC@ZIF-8) was synthesized for the first time, which prolonged the sustained-release of RVC and decreased the resulting drug toxicity. RVC can continuously release in vitro for at least 96 h with high drug loading of 30.6% and RVC@ZIF-8 had excellent biocompatibility and low cytotoxicity. In sciatic nerve block model, the sensory block time of RVC@ZIF-8 was significantly prolonged compared with RVC, achieving more than 72 h post injection and no inflammation or lesion were found. Based on high drug loading, ideal sustained-release and superior biological safety, RVC@ZIF-8 will be a novel delivery material for local anesthetic with potential application.