Hydrogels are natural or synthetic polymer networks that exhibit high water absorbent capacities and have been used as scaffolds for tissue engineering or as delivery carriers for therapeutic agents and cells. Owing to their tunable physicochemical properties, hydrogels can provide spatial and temporal control over the release of loaded therapeutic agents, including chemotherapeutic drugs, proteins or cells. In particular, in situ-forming injectable hydrogels, the state-of-the-art clear free flowing polymer solutions that transform to viscoelastic gels upon exposure to stimuli including pH, temperature, light, enzymes and magnetic field, have been widely studied as delivery carriers for therapeutic agents. Therapeutic agents can be easily mixed with the free flowing polymer solutions and injected into the subcutaneous tissue or target site that could form a viscoelastic gel and act as therapeutic agents release depot. Hence, injectable hydrogels paid attention as sustained delivery vehicles. In this review, we systematically summarize the development of biocompatible, biodegradable, and pH- and temperature-responsive injectable hydrogels for sustained release of therapeutic agents. The key factors responsible for in situ gelation, interaction between polymers and therapeutic agents, and controlling the degradation of hydrogel matrix, are discussed. Advantages and perspectives of pH- and temperature-responsive injectable hydrogels in sustained therapeutic agents release are highlighted.