Efficient extraction of oxygen from ambient waters played a critical role in the development of early arthropods. Maximizing gill surface area enhanced oxygen uptake ability but, with gills necessarily exposed to the external environment, also presented the issue of gill contamination. Here we document setae inserted on the dorsal surface of walking legs of the benthic-dwelling middle Cambrian Olenoides serratus and on the gill shaft of the Late Ordovician Triarthrus eatoni. Based on their physical positions relative to gill filaments, we interpret these setae to have been used to groom the gills, removing particles trapped among the filaments. The coordination between setae and gill filaments is comparable to that seen among modern crustaceans, which use a diverse set of setae-bearing appendages to penetrate between gill filaments when grooming. Grooming is known relatively early in trilobite evolutionary history and would have enhanced gill efficiency by maximizing the surface area for oxygen uptake.