A hydrogel-based implant enables sustained-release delivery of valproic acid for improved treatment of intracranial glioblastoma.