A surface deposition treatment like electroless Ni–B deposition, which is a new candidate to use in a wide range of engineering applications owing to many advantages, including low cost and good wear resistance, may improve the antibacterial activity and physical properties of stainless steel biomedical devices. In the present study, the structural and antibacterial properties of electroless Ni–B coatings deposited on AISI 304 stainless steels under different deposition conditions were investigated. Escherichia coli, the most important causative organism for infection, were used as the testing bacteria for in vitro test, including incubation at 37°C and 24 h. X-ray diffraction for crystallographic examination and scanning electron microscopy for morphological analysis were also used. The characterisation results showed that the antibacterial activity of the steel substrates deposited with coatings having especially high NaBH4 concentrations (1·2 g L−1), thus being amorphous, was strongly improved. Furthermore, the bactericidal performance difference of the coatings exhibiting cauliflower-like surface morphology was more obvious than that of the others. Electroless Ni–B surface treatment may be utilised for increasing the lifetime of stainless biomedical devices.