Microfluidic flow on chemically heterogeneous surfaces is a useful technique with applications ranging from selective material deposition to the self-assembly of nanostructures. The recent theoretical analysis by Davis [Phys. Fluids 17, 038101 (2005)] of the dip coating of a pure fluid onto vertical, wetting stripes surrounded by nonwetting regions quantified the experimentally observed deviations from the classical Landau-Levich result due to lateral confinement of the fluid by chemical surface patterning. In this present work, the analysis of dip coating of these heterogeneous surfaces is extended to a liquid containing an insoluble surfactant. Using matched asymptotic expansions based on lubrication theory in the limit of a small capillary number, the thickness of the deposited liquid film and the surfactant concentration in the deposited monolayer are predicted for a wide range of fluid properties and process parameters. The increase in the deposited film thickness is shown analytically to be limited by a multiplicative factor of 41∕3 times the result for a pure liquid. Numerical results demonstrate that the thickening due to Marangoni effects is nonmonotonic in the capillary number because of the competition between viscous stresses, Marangoni stresses, and surface diffusion.