This research investigates the gel formation behaviour and drug-controlling performance of doxycycline-loaded ibuprofen-based in-situ forming gels (DH-loaded IBU-based ISGs) for potential applications in periodontal treatment. The investigation begins by exploring the physical properties and gel formation behaviour of the ISGs, with a particular focus on determining their sustained release capabilities. To gain a deeper understanding of the molecular interactions and dynamics within the ISGs, molecular dynamic (MD) simulations are employed. The effects of adding IBU and DH on reducing surface tension and water tolerance properties, thus affecting molecular properties. The phase transformation phenomenon is observed around the interface, where droplets of ISGs move out to the water phase, leading to the precipitation of IBU around the interface. The optimization of drug release profiles ensures sustained local drug release over seven days, with a burst release observed on the first day. Interestingly, different organic solvents show varying abilities to control DH release, with dimethyl sulfoxide (DMSO) demonstrating superior control compared to N-Methyl-2-pyrrolidone (NMP). MD simulations using AMBER20 software provide valuable insights into the movement of individual molecules, as evidenced by root-mean-square deviation (RMSD) values. The addition of IBU to the system results in the retardation of IBU molecule movement, particularly evident in the DMSO series, with the diffusion constant value of DH reducing from 1.2452 to 0.3372 and in the NMP series from 0.3703 to 0.2245 after adding IBU. The RMSD values indicate a reduction in molecule fluctuation of DH, especially in the DMSO system, where it decreases from over 140 to 40 Å. Moreover, their radius of gyration is influenced by IBU, with the DMSO system showing lower values, suggesting an increase in molecular compactness. Notably, the DH-IBU configuration exhibits stable pairing through H-bonding, with a higher amount of H-bonding observed in the DMSO system, which is correlated with the drug retardation efficacy. These significant findings pave the way for the development of phase transformation mechanistic studies and offer new avenues for future design and optimization formulation in the ISG drug delivery systems field.