Microorganisms form biofilms containing differentiated cell populations. To determine factors driving differentiation, we herein visualize protein and metal distributions within Pseudomonas aeruginosa biofilms using imaging mass spectrometry. These in vitro experiments reveal correlations between differential protein distribution and metal abundance. Notably, zinc- and manganese-depleted portions of the biofilm repress the production of anti-staphylococcal molecules. Exposure to calprotectin (a host protein known to sequester metal ions at infectious foci) recapitulates responses occurring within metal-deplete portions of the biofilm and promotes interaction between P. aeruginosa and Staphylococcus aureus. Consistent with these results, the presence of calprotectin promotes co-colonization of the murine lung, and polymicrobial communities are found to co-exist in calprotectin-enriched airspaces of a cystic fibrosis lung explant. These findings, which demonstrate that metal fluctuations are a driving force of microbial community structure, have clinical implications because of the frequent occurrence of P. aeruginosa and S. aureus co-infections.