Males of some species possess extra reproductive organs called accessory glands which are outgrowths of the testes or sperm duct. These organs have a well-established role in reproduction; however, they also appear to have other important functions that are less understood. Here, we investigate the function of the highly complex accessory glands of a marine toadfish,
Porichthys notatus, a fish with two reproductive male types: large care-providing ‘guarder’ males and small non-caring ‘sneaker’ males. While both male types have accessory glands, guarder male accessory glands are much larger relative to their body size. We show that accessory gland fluids strongly inhibit the growth of bacterial genera associated with unhealthy eggs and have no effect on the growth of strains isolated from healthy eggs. This antibacterial effect was particularly pronounced for extracts from guarder males. Furthermore, we demonstrate that both healthy and unhealthy plainfin midshipman eggs have diverse but distinct microbial communities that differ in their composition and abundance. The highly specific inhibitory capacity of accessory gland fluid on bacteria from unhealthy eggs was robust across a wide range of ecologically relevant temperatures and salinities. Collectively, these ecological and molecular observations suggest a care function for the accessory gland mediated by antimicrobial agents.