This study focused on the preparation of Ag-containing porous layers on the surface of a 6061 aluminum alloy using different voltages. The microstructure, Ag deposition form, corrosion resistance, and antibacterial properties of the Ag-containing porous layers on the 6061 aluminum alloy were analyzed using scanning electron microscopy, X-ray photoelectron spectroscopy, electrochemical workstation, and antibacterial tests. The results indicated that the Ag-containing porous layer prepared at 30 V exhibited the highest Ag deposition and antibacterial rate, amounting to 1.78 wt% and 99.73 %, respectively. The deposited Ag mainly existed in the form of Ag+ combined with O2− and SO42− within the Ag-containing porous layers. Compared to that of the 6061 aluminum alloy matrix, the Ag-containing porous layer prepared at 30 V had a wear volume of 0.015 mm3, a reduction of 98.37 %, an increase in the corrosion potential (Ecorr) to −0.485 V, and an increase of 0.848 V. In conclusion, Ag-containing porous layers demonstrated significant antibacterial, wear resistance, and corrosion resistance properties.