The objective of this work is to evaluate the effective removal of mud cake formed by drilling fluid for microemulsion-based flushing fluid. The microemulsions were prepared with vegetable castor oil, 2%wt KCl as aqueous phase, and nonionic surfactant (Ultranex NP40). Thermal stability, rheological, removal, and wettability inversion were performed to evaluate the performance of the microemulsion-based flushing fluid. Rheological tests showed that microemulsions behaved like Newtonian fluids. The best formulation of flushing fluid was 70% surfactant/25% oil phase/5% aqueous phase, with cloudy temperature at 365.25 K, removal efficiency of mud cake of 84.85 %, and high capability of wettability inversion.