Sociobiology has revolutionized our understanding of interactions between organisms. Interactions may present a social dilemma where the interests of individual actors do not align with those of the group as a whole. Viewed through a sociobiological lens, nearly all interactions can be described regarding their costs and benefits, and a number of them then resemble a social dilemma. Numerous experimental systems, from bacteria to mammals, have been proposed as models for studying such dilemmas. Here, we make use of the external immune system of the red flour beetle, Tribolium castaneum, to investigate how the experimental duration can affect whether the external secretion comprises a social dilemma or not. Some beetles (secretors) produce a costly quinone‐rich external secretion that inhibits microbial growth in the surrounding environment, providing the secretors with direct personal benefits. However, as the antimicrobial secretion acts in the environment of the beetle, it is potentially also advantageous to other beetles (nonsecretors), who avoid the cost of producing the secretion. We test experimentally if the secretion qualifies as a public good. We find that in the short term, costly quinone secretion can be interpreted as a public good presenting a social dilemma where the presence of secretors increases the fitness of the group. In the long run, the benefit to the group of having more secretors vanishes and becomes detrimental to the group. Therefore, in such seminatural environmental conditions, it turns out that qualifying a trait as social can be a matter of timing.