Policing occurs in insect, animal and human societies, where it evolved as a mechanism maintaining cooperation. Recently, it has been suggested that policing might even be relevant in enforcing cooperation in much simpler organisms such as bacteria. Here, we used individual-based modelling to develop an evolutionary concept for policing in bacteria and identify the conditions under which it can be adaptive. We modelled interactions between cooperators, producing a beneficial public good, cheaters, exploiting the public good without contributing to it, and public good-producing policers that secrete a toxin to selectively target cheaters. We found that toxin-mediated policing is favoured when (a) toxins are potent and durable, (b) toxins are cheap to produce, (c) cell and public good diffusion is intermediate, and (d) toxins diffuse farther than the public good. Although our simulations identify the parameter space where toxin-mediated policing can evolve, we further found that policing decays when the genetic linkage between public good and toxin production breaks. This is because policing is itself a public good, offering protection to toxin-resistant mutants that still produce public goods, yet no longer invest in toxins. Our work thus highlights that not only specific environmental conditions are required for toxin-mediated policing to evolve, but also strong genetic linkage between the expression of public goods, toxins and toxin resistance is essential for this mechanism to remain evolutionarily stable in the long run.