In this article, the molecular level investigation on the detachment process of the alkane contaminant from the fused silica surface in nonionic surfactant solution is performed by using molecular dynamics simulation. Three important cleaning parameters including surfactant molecule structure, temperature and surfactant concentration are discussed. We found that the hydrophilic tail of the nonionic surfactant molecule plays a leading role in the desorption process of the oil droplet. The activated chemical activity in surfactant solution with the increasing temperature of solution facilitates the desorption of alkane contaminant. The critical surfactant concentration is vital for cleaning in a real situation. High surfactant concentration can facilitate the desorption of oil droplet in a static solution. The efficiency of water flooding decrease, when the concentration of surfactant is high. Our study can help to understand the cleaning mechanism in surfactant solution and is important for its application in industrial cleaning.