There is growing awareness of the importance of cooperative behaviours in microbial communities. Empirical support for this insight comes from experiments using mutant strains, termed ‘cheats’, which exploit the cooperative behaviour of wild-type strains. However, little detailed work has gone into characterising the competitive dynamics of cooperative and cheating strains. We test three specific predictions about the fitness consequences of cheating to different extents by examining the production of the iron-scavenging siderophore molecule, pyoverdin, in the bacterium Pseudomonas aeruginosa. We create a collection of mutants that differ in the amount of pyoverdin that they produce (from 1% to 96% of the production of paired wild types) and demonstrate that these production levels correlate with both gene activity and the ability to bind iron. Across these mutants, we found that (1) when grown in a mixed culture with a cooperative wild-type strain, the relative fitness of a mutant is negatively correlated with the amount of pyoverdin that it produces; (2) the absolute and relative fitness of the wild-type strain in the mixed culture is positively correlated with the amount of pyoverdin that the mutant produces; and (3) when grown in a monoculture, the absolute fitness of the mutant is positively correlated with the amount of pyoverdin that it produces. Overall, we demonstrate that cooperative pyoverdin production is exploitable and illustrate how variation in a social behaviour determines fitness differently, depending on the social environment.