Local anesthetics are important for the treatment of postoperative pain. Since a single injection of the solution of a drug such as bupivacaine (BUP) works only for a few hours, it is much required to develop a long-term injectable formulation that maintains its efficacy for more than 1 day. Herein, an intelligent copolymer hydrogel loaded with BUP microcrystals was invented. The biodegradable block copolymer was synthesized by us and composed of a central hydrophilic poly(ethylene glycol) (PEG) block and two hydrophobic poly(lactide–glycolide) (PLGA) blocks. The aqueous system of the amphiphilic copolymer underwent a sol-gel transition between room temperature and body temperature and, thus, physically gelled after injection. Considering the decrease of solubility of BUP with the increase of pH and the internal acidic environment due to the hydrolysis of PLGA, calcium carbonate (CaCO) powder was introduced as a pH regulator. Then, the internal pH was found to be nearly neutral and many BUP microcrystals were dispersed in the gel network. In this way, BUP had achieved a sustained release out of the thermogel. The maximum possible effect (MPE) in a rat sciatic nerve blockade model was used to describe the sensory blockade effect. analgesic effects evaluated with a hot plate experiment of rats demonstrated that the thermogel encapsulated with BUP microcrystal and CaCO powder significantly prolonged analgesia up to 44 h, the duration time with respect to 50% MPE. The intramuscularly injected implant exhibited biocompatibility in histological analyses. Besides, the untreated leg of the rats was not influenced by the treated leg, indicating no obvious systematic anesthesia of this hydrogel formulation. Such an intelligent and composite formulation represents a potential strategy for long-acting analgesia therapy.