The search for new formulations of anaesthetic agents that allow a localized administration and provide a prolonged effect is of great interest in the multimodal management of postoperative pain. The pre-formulation and characterization of a lidocaine and dexamethasone thermosensitive and bioadhesive long-acting gel for intraperitoneal administration was done as a tool in the management of pain in abdominal surgeries. The pre-formulation process was conducted by a systematic variation of the concentration of the different polymers, until setting it, in a suitable concentration that allowed an adequate gelation temperature. The poloxamer 407 (P407) was used as the main polymer; hydroxypropyl methylcellulose (HPMC) as the bioadhesive agent and polyvinyl pyrrolidone (PVP) to adjust the gelation temperature and physicochemical properties. The formulations were characterized by gelation temperature, pH, viscosity at 25 °C and 37 °C, gelation time, density and osmolality. Gelation temperature was decreased when increasing the concentration of hydroxypropyl methylcellulose and poloxamer 407, this effect was also observed when adding lidocaine hydrochloride and dexamethasone sodium phosphate to the formulations. The gelation temperature did not have statistically significant relation with the PVP concentration (P-value of 0.6797), even though, there is a tendency in the gelation temperature by varying it. Between the developed formulations, the 12.5/3.3/0.4% (P407/HPMC/PVP) formulation presents an appropriate gelation temperature, a suitable viscosity for administration by syringe, an adequate and stable pH and osmolality to prevent tissue damage and a correct gelation time that allowed the formation of a prolonged release implant.