A surface texture produced by three-step microarc oxidation (MAO) was optimized to improve the tribology performance of a self-lubricating composite coating for diesel engine piston skirts. WS2 was introduced into the self-lubricating composite coating as a self-lubricating additive. The effects of MAO’s varying electrical parameters in terms of stages and action time on the microstructure and chemical composition of the coatings were analyzed by XPS mapping, micron CT, SEM, XRD, and EDS mapping. Furthermore, friction-wear tests under dry lubricating were employed to evaluate the self-lubricating property of the composite coating. Compared to the bare ZL109 aluminum alloy, the optimized composite coating’s friction coefficients were reduced by 60%. Notably, the wear loss of cylinder liner samples matched with the optimized composite coating was almost zero under this work condition.