Oviparous animals have evolved multiple defenses to prevent microbes from penetrating their eggs and causing embryo mortality. In birds, egg constituents such as lysozyme and antibodies defend against microbial infestation, but eggshell pigments might also impact survival of bacteria. If so, microbes could exert an important selective pressure on the evolution of eggshell coloration. In a previous lab experiment, eggshell protoporphyrin caused drastic mortality in cultures of Gram positive, but not Gram negative, bacteria when exposed to light. Here, we test this “photodynamic antimicrobial hypothesis” in a field experiment. In a paired experimental design, we placed sanitized brown, protoporphyrin‐rich chicken eggs alongside white eggs that lack protoporphyrin. We deployed eggs for 48 hr without incubation, as can occur between laying and incubation, when microbial infection risk is highest. Eggs were placed on the open ground exposed to sunlight and in dark underground storm‐petrel burrows. We predicted that the proportion of Gram‐positive bacteria on brown eggs should be lower when exposed to sunlight than when kept in the dark, but we expected no such difference for white eggs. Although our data revealed variation in bacterial community composition, the proportion of Gram‐positive bacteria on eggshells did not vary by egg color, and there was no interaction between egg color and location. Instead, Gram‐positive bacteria were proportionally more common on eggs on the ground than eggs in burrows. Overall, our experiment did not support the photodynamic antimicrobial hypothesis. The diverse range of avian egg colors is generated by just two pigments, but over 10 hypotheses have been proposed for the evolution of eggshell color. If our results are generalizable, eggshell protoporphyrin might not play a substantial role in defending eggs against microbes, which narrows the field of candidate hypotheses for the evolution of avian eggshell coloration.