Liquid detergent with combination of MES surfactant and TiO2 nanoparticles to remove and degrade the dirt in the form of methylene blue and produce waste with the lowest surfactant residual concentration has been done. The formation of MES is carried out by esterification and transesterification of crude palm oil, sulfonation, refining, and neutralization. The photocatalyst TiO2 nanoparticles is added as an additive to improve surfactant performance in removing dirt and degrading organic compounds. MES formation is performed by varying the mole ratio of the reactants in the esterification and transesterification reactions, and the mole ratios between methyl esters and NaHSO3 during the sulfonation reaction. Variations of MES surfactant and TiO2 nanoparticles compositions were performed to obtain detergent stability. Data analysis technique in this research is characterization of methyl ester, MES surfactant, and detergent using UV-Vis spectrophotometer instrument, FTIR, GC-MS, and LC-MS. The optimum conditions in the esterification and transesterification process were each mole ratio of 1: 6 between CPO and methanol based on the highest conversion, 99%. The optimum condition of the sulfonation process is the 1: 1.5 mole ratio between methyl ester and NaHSO3 based on the lowest surface tension value, which is about 36 dyne/cm.