Electrodeposition of composites is a low-cost and low-temperature method, which is used to make metal matrix composite coatings. In this study, various amounts of surfactants of anionic sodium dodecylsulfate and cationic cetyltrimethylammonium bromide were used as additives in composite coating of Ni/TiN. Watts bath was used as the plating bath with the concentration of particles, current density and agitation speed which were considered to be 30g/lit, 4A/dm2 and 450rpm, respectively. The results showed that the anionic surfactant causes more particles to be present in the composite coatings compared with cationic caused. An increase in the SDS concentration to the optimal value led to more uniform dispersion of nanoparticles in the coating. The hardness of pure nickel and optimal composite coating SDS were measured by AFM and the results showed that the hardness of coating, in the presence of particles, increases from 1.86 to 3.23 GPa, and its wear resistance showed an increased value.