Scientists have uncovered an evolutionary paradox where men damage their ability to have children during efforts to make themselves look more attractive.
Taking steroids to get a buff physique or anti-baldness pills to keep a full head of hair can damage fertility.
It has been named the Mossman-Pacey paradox after the scientists who first described it.
They say it causes a lot of heartache in couples struggling to conceive.
“I noticed some men coming in to have their fertility tested and these guys were huge,” says Dr James Mossman, now at Brown University in the United States.
He was studying for his doctorate in Sheffield when he made the connection with steroid abuse.
He told the BBC: “They are trying to look really big, to look like the pinnacles of evolution.
“But they are making themselves very unfit in an evolutionary sense, because without exception they had no sperm in their ejaculation at all.”
Anabolic steroids mimic the effect of the male hormone testosterone in the body and are used as performance-enhancing drugs to increase muscle growth.
They are regularly used by bodybuilders.
Prof Allan Pacey, from the University of Sheffield, added: “Isn’t it ironic that men go to the gym to look wonderful, for the most part to attract women, and inadvertently decrease their fertility.”
Anabolic steroids fool the brain’s pituitary gland into thinking the testes are going into overdrive.
So the glands react by shutting down the production of two hormones – called FSH and LH – which are the key hormones that drive the production of sperm.
The researchers say there is a similar theme in men using medication to prevent male pattern baldness.
The drug finasteride changes the way testosterone is metabolised in the body and can limit hair loss, but side effects can include erectile dysfunction and a hit to fertility.
Prof Pacey told the BBC: “I would say more anabolic steroid users are likely to become sterile than you would think – 90% probably.
“Baldness is a bit more hit-and-miss, but sales are going through the roof and that makes it an increasingly common problem.”
The measure of success in evolutionary terms is passing on your genes (instructions in your DNA) to the next generation.
Dr Mossman said taking these vanity-based medications might make you more attractive but could turn you into “an evolutionary dud”.
It is not the equivalent of the extravagant peacock’s tail, which makes males more attractive to females and increases the chances of passing genes on to the next generation.
There are some examples in the natural world where an animal sacrifices their ability to breed.
Some bird species perform co-operative breeding in which individuals forego having their own offspring to help raise the descendants of close relatives.
But even this can make sense in evolutionary terms as half of your genes are shared with siblings so they are still being passed on, just indirectly.
Dr Mossman suspects “thinking you’re more appealing to the opposite sex, but killing your fertility” is probably unique to humans.
Prof Pacey told the BBC: “The irony is one thing, but I think the key message is for fertility patients.
“It keeps cropping up in clinics and the message is not getting out to young men that it’s a problem and a bit of info could save them a lot of heartache.”
Follow James on Twitter.