Reproduction through sex carries substantial costs, mainly because only half of sexual adults produce offspring. It has been theorized that these costs could be countered if sex allows sexual selection to clear the universal fitness constraint of mutation load. Under sexual selection, competition between (usually) males and mate choice by (usually) females create important intraspecific filters for reproductive success, so that only a subset of males gains paternity. If reproductive success under sexual selection is dependent on individual condition, which is contingent to mutation load, then sexually selected filtering through 'genic capture' could offset the costs of sex because it provides genetic benefits to populations. Here we test this theory experimentally by comparing whether populations with histories of strong versus weak sexual selection purge mutation load and resist extinction differently. After evolving replicate populations of the flour beetle Tribolium castaneum for 6 to 7 years under conditions that differed solely in the strengths of sexual selection, we revealed mutation load using inbreeding. Lineages from populations that had previously experienced strong sexual selection were resilient to extinction and maintained fitness under inbreeding, with some families continuing to survive after 20 generations of sib × sib mating. By contrast, lineages derived from populations that experienced weak or non-existent sexual selection showed rapid fitness declines under inbreeding, and all were extinct after generation 10. Multiple mutations across the genome with individually small effects can be difficult to clear, yet sum to a significant fitness load; our findings reveal that sexual selection reduces this load, improving population viability in the face of genetic stress.