Sperm shape, movement and vitality improved in men who added walnuts to their diet over 12 weeks.
The fatty acids found in these nuts are thought to have helped sperm development. It is not known if this would help improve male fertility.
About one in six couples are infertile, with 40% of these due to a male factor.
Dr Allan Pacey, senior lecturer in andrology at the University of Sheffield said: "It would be relatively easy to poke fun at studies like this, but there is increasing evidence to show that aspects of a man's diet can affect the number and quality of sperm produced by his testicles."
The researchers say the next step is to work with couples who are attending infertility clinics to determine if placing sub-fertile men, with poor semen quality, on a walnut diet results in better success conceiving.
This study involved 117 men between the ages of 21 and 35, who were divided into two groups. One group added 2.6 ounces (75 grams) of whole-shelled walnuts to their daily diet.
The other group continued their usual diet but avoided eating tree nuts. Both groups ate a typical Western-style diet.