Using anticancer drug-encapsulated nanocarriers to actively target tumors is a promising chemotherapy strategy. Nevertheless, premature release of the drugs in tumor microenvironment (TME) or low tumor targeting efficiency of the nanocarriers significantly reduces its therapeutic efficiency. Herein, we propose a release-and-trapping strategy that significantly enhances the chemotherapeutic efficiency of an anticancer drug camptothecin. TME acid triggers the release of its prodrug from the nanocarrier and thereafter phosphatase instructs the prodrug to form hydrogel to trap the nanocarrier on cancer cell membrane. As trapped nanocarrier facilitates cell uptake of the prodrug and its intracellular carboxylesterase-mediated hydrolysis to release camptothecin. In vitro studies showed that the prodrug release from nanocarrier was maximized at pH 6.5. In tumor-bearing mice, our release-and-trapping strategy significantly prolonged the retention of the nanocarrier in tumor and significantly enhanced the anticancer efficacy of camptothecin. We propose that our release-and-trapping strategy be applied for more efficient cancer treatment in the future.