The flow behavior of many multiphase flow applications is greatly influenced by wetting properties and the presence of surfactants. We present a numerical method for two-phase flow with insoluble surfactants and contact line dynamics in two dimensions. The method is based on decomposing the interface between two fluids into segments, which are explicitly represented on a local Eulerian grid. It provides a natural framework for treating the surfactant concentration equation, which is solved locally on each segment. An accurate numerical method for the coupled interface/surfactant system is given. The system is coupled to the Navier-Stokes equations through the immersed boundary method, and we discuss the issue of force regularization in wetting problems, when the interface touches the boundary of the domain. We use the method to illustrate how the presence of surfactants influences the behavior of free and wetting drops. © 2014 Elsevier Ltd.