The invention particularly relates to a method for preparing a wear-resistant self-lubricating coating of aluminum and aluminum alloy. The method comprises the steps of firstly, carrying out roughening treatment on a matrix, then, preparing a self-lubricating coating A on the surface of the matrix, carrying out polishing treatment on the self-lubricating coating A, then, carrying out pretreatmenton a test piece, then, preparing a hard particle reinforcing phase by adopting an electrochemical in-situ growth method, and finally, preparing a self-lubricating coating B on the hard particle reinforcing phase, wherein the roughening treatment adopts a chemical roughening or mechanical roughening method, a roughening solution for chemical roughening treatment contains 80-200g/L of ammonium bifluoride, 10-90g/L of ammonium chloride, 0.01-5g/L of copper chloride, 1-20g/L of polyethylene glycol, 0.5-20g/L of sodium gluconate, 1-20g/L of boric acid and 1-20g/L of glycerol, and the mechanical roughening method comprises sandblasting roughening, shot jetting roughening, shot blasting roughening or 3D printing roughening. According to the method, the coefficient of friction of the wear-resistant self-lubricating coating is effectively lowered, and the service life of the wear-resistant self-lubricating coating is prolonged.