This research focuses on the combined effectiveness of imidazolium-based ionic liquids (ILs) with triflate anion and carboxymethylcellulose-based hydrogels (CBHs) for environmentally friendly oil recovery. The selection of ILs was based on a review of existing literature, and their performance in extreme reservoir conditions was evaluated by studying parameters like concentration, salinity, temperature, and alkyl chain length. A new material,ionic liquid based CBH (CBHIL), was synthesized by incorporating ILs into hydrogels, and its structure was analyzed using various tests including FTIR, TGA, rheology, and SEM morphology tests. To evaluate the performance in EOR processes, particularly in carbonate rocks, a multilayer glass micromodel with permeabilities was designed. The objective was to determine the water-absorbing capacity, equilibrium swelling, and contact angle change, ultimately leading to increased oil recovery. The results indicated that 1-hexyl-3-methylimidazolium triflate (IL6) was able to reduce interfacial tension (IFT) to a minimum of 6.5 mN/m, surpassing 1-butyl-3-methylimidazolium triflate (IL4), especially at high temperatures and salinity. The emulsion stability of IL6 in the oil phase was also confirmed. CBH was used as a carrier for ILs, exhibiting thermal resistance up to 120 °C. Its porous structure and significant equilibrium swelling of up to 1550 % under harsh reservoir conditions were observed. By incorporating IL in the CBHIL-C6 structure, the linear viscoelastic range of CBH increased from 52.2 % to 170 % strain, and effectively altered carbonate rocks to become completely water-wet, reducing the contact angle from 115.4° to 44.62°. The combination of these two substances led to a maximum recovery of 79.85 % of the original oil in place, a significantly superior outcome compared to separate injection of the substances. Thus, these new compounds demonstrate promising potential for EOR applications in challenging reservoir conditions.