Two-dimensional graphene oxide (GO) nanosheets have great application potential in the field of surface protection. However, the agglomeration of graphene oxide and the nanopores on its surface often weaken its protective performance. Based on this, stearic acid (SA) is grafted onto the GO sheet and the SA-GO composite coating is prepared on the surface of AZ31B Mg alloy by a self-assembly method. SEM, XRD and FT-IR are used to characterize the surface morphology, structure and functional groups of the coating, respectively. Water contact angle measuring instrument, electrochemical workstation and friction and wear testing machine are used to characterize the wettability, corrosion and wear resistance of the coating, respectively. Electrochemical measurements indicate that the introduction of SA-GO coating reduces the corrosion current density by about three orders of magnitude and significantly improves the corrosion resistance of the Mg alloy, which is related to the reduction of the intrinsic capillaries and the increasing of hydrophobicity. Additionally, compared with that of the Mg alloy substrate, the wear rate of the SA-GO coating is reduced by 99.3%, and the friction coefficient is reduced by 83.1%. It is related to the easier slippage of the GO sheets caused by the increased interlaminar spacing and the self-lubricating properties of SA. This paper provides an experimental and theoretical basis for the research on the integrated anti-corrosion/wear protection of metal surface.