The present invention proposes the use of an electrolytic bath to electroplate metal composites of nickel-phospohrous-metal nano-particles having antibacterial ability, which inhibits bacteria growing, such as Escherichia coli and Staphylococcus aureus, at least on 99% of its surface. The method of formulating an electrolytic bath allowing to obtain antibacterial coatings includes the following steps: a) adding p3+ ions to an electrolytic bath containing dissolved Ni salts, b) adding to the electrolytic bath metal nano-particles having antibacterial ability suspended in a cationic surfactant, c) electroplating the antibacterial composite metal of Ni-P-metal by applying a direct current density. The occlusion of metal nano-particles having antibacterial ability in the coating matrix provides it with antibacterial features.