Chronic pain is currently treated with opioids that offer unsatisfactory long-term analgesia and produce serious side effects. There is a clear need for alternative therapies. Herein, peptide-based hydrogels are used as extended-release drug delivery carriers. Two different formulations were developed: the drug is coformulated within the hydrogen the drug is an integral part of the hydrogelator. Both strategies afford a prolonged and significant antinociception up to 72 h after subcutaneous administration in mice.