In situ forming systems including thermoreversible hydrogels, which undergo sol–gel transition upon an increase in temperature have been used for various biomedical applications. Heparins are the standard of anticoagulation in the prophylaxis and treatment of deep vein thrombosis and pulmonary embolism. Both conditions require long-lasting treatment with frequent subcutaneous administrations of heparin. The objective of this study was to prepare and evaluate in situ forming gel systems designed by combination of two poloxamers (P407 and P188) and hydroxypropylmethylcellulose (HPMC) for prolonged release of heparin. Thermoreversible hydrogels were prepared with heparin solution and dispersion of heparin/chitosan nanocomplexes. Nanocomplexes formed by self-assembly of heparin with chitosan at various mass ratios were thoroughly characterized. A heparin/chitosan mass ratio of 1:1 with pH 5.20 was the most appropriate for preparation of small, homogenous and stable nanocomplexes (mean diameter 123 nm; polydispersity index 0.22 and zeta potential + 35.5 mV). Thermoreversible hydrogels were evaluated by gelation temperature, viscosity over the temperature range 20–40 °C, rate of hydrogel dissolution, and heparin release in vitro. The addition of P188 to P407 gel formulations resulted in an increase in gelation temperature, decrease in viscosity at room temperature and faster gel dissolution. The opposite effects were observed with formulations containing HPMC which demonstrated 18-day-long gel dissolution and complete heparin release in 9 days from gels containing heparin solution. Considerable prolongation of heparin release was achieved with incorporation of heparin/chitosan nanocomplexes into the gelling systems. It may be concluded that with poloxamer mixtures at specific concentrations, addition of HPMC and use of heparin/chitosan nanocomplexes dispersions, thermoreversible formulations for prolonged subcutaneous release of heparin are feasible.