Climate change is affecting biodiversity, but proximate drivers remain poorly understood. Here, we examine how experimental heatwaves impact on reproduction in an insect system. Male sensitivity to heat is recognised in endotherms, but ectotherms have received limited attention, despite comprising most of biodiversity and being more influenced by temperature variation. Using a flour beetle model system, we find that heatwave conditions (5 to 7 °C above optimum for 5 days) damaged male, but not female, reproduction. Heatwaves reduce male fertility and sperm competitiveness, and successive heatwaves almost sterilise males. Heatwaves reduce sperm production, viability, and migration through the female. Inseminated sperm in female storage are also damaged by heatwaves. Finally, we discover transgenerational impacts, with reduced reproductive potential and lifespan of offspring when fathered by males, or sperm, that had experienced heatwaves. This male reproductive damage under heatwave conditions provides one potential driver behind biodiversity declines and contractions through global warming.