Implantable, injectable, insertable, or otherwise administrable compositions that form hydrogels when implanted, injected, inserted, or administered into or onto living tissues comprise a pharmaceutically effective compound wherein the pharmaceutically effective compound is a codrug, or pharmaceutically acceptable salt or prodrug thereof in admixture with a hydrogel-forming compound. The pharmaceutically effective compound may be any compound that is soluble in bodily fluids, or that forms bodily fluid-soluble adducts when exposed to bodily fluids. Exemplary compounds include analgesic, anti-inflammatory and antibiotic compounds. The hydrogel-forming compound is a biologically tolerated substance that forms a hydrogel upon exposure to bodily fluids, such as the interstitial fluid surrounding or within a joint.