Acyclovir (ACV) is a potentially effective antiviral medication; however, it has a serious drawback, which is its poor solubility, bioavailability, and short half-life. The goal of this study is to improve its drawbacks through the synthesis of nanogels. In this study, the cross-linked hyaluronic acid-grafted poly(acrylamide-co-itaconic acid) nanogel is synthesized successfully through free radical polymerization and used as a safe pH-responsive carrier for ACV. The nanogels showed pH response in vitro and in vivo. The prepared nanogel C5 (1:1 ratio of acrylamide: itaconic), which had the highest grafting efficiency, showed maximum swelling, drug loading, and release in pH 7.4, higher than pH 1.2. Also, nanogel C5, which had a large surface area, showed good stability, and its matrices shrank in acidic medium and protected the drug, while in basic medium, it expanded and released ACV in a sustained manner and improved the bioavailability and half-life of ACV in vivo.