The key first step in developing bacterial infections related to implants and medical devices is the attachment of planktonic bacterial cells, and subsequent formation of biofilms. Herein, it is reported that graphene, a 2D carbon-based material, can be effectively used to prevent bacterial attachment. The key parameter for this effect is the orientation of graphene with respect to the coated surface. Chemical vapor deposition (CVD) graphene, deposited horizontally on the surface, exhibits no antibacterial effect. By contrast, an array of graphene flakes grown perpendicularly to the surface by a plasma-enhanced CVD (PECVD) process prevent biofilm formation. Electron microscopy reveals that the exposed edges of vertically aligned graphene flakes penetrate the bacterial membrane and drain the cytosolic content. Bacteria are not able to develop resistance to this killing mechanism during multiple exposures. By keeping the height of the vertical graphene coating between 60 and 100 nm, the coating is able to effectively kill bacteria, while being completely harmless to mammalian cells.