Metal meshes with controlled surface properties have shown great potential for oil–water separation. However, it is still challenging to prepare cost-effective meshes to satisfy the material requirements under a variety of harsh conditions. In this study, polydopamine was deposited on the surface of stainless steel mesh to provide amine groups as active sites, and a series of modification strategies were constructed through sulfur-based three-component coupling reactions between the amine-functionalized mesh and aliphatic amine, alkyne, isocyanide. The prepared metal meshes showed excellent hydrophobicity with water contact angle in the range of 131–142° and could be used to separate a series of oil–water mixtures with separation efficiency above 99 % and flux higher than 2.3 × 104 L/m2/h. In addition, the separation capabilities of the developed meshes remained stable after 10 cyclic operations. More significantly, the modified meshes could tolerate repeated and prolonged usage and demonstrated excellent stability under various chemical conditions. It was found that the sulfur-based three-component reaction was a versatile way to get functional surface for metal substrate.