A team from the University of Bristol examined 2,512 men aged between 45 and 59, from Caerphilly in South Wales.
They found that during the 15 years of the study, men with the shortest legs were most likely to suffer heart problems.
Men with shorter legs were significantly more likely to develop a condition called insulin resistance.
This is when the body's ability to process sugars in the blood is impaired.
Eventually, it can lead to diabetes.
The association held good even if the rest of the man's body was not short.
The blood of short-legged men was also more likely to have raised levels of fat and a blood clotting substance called fibrinogen - both of which are linked to an increased risk of heart disease.
Poor nutrition
The researchers speculate that short legs are a sign of poor nutrition during childhood.
Lead researcher Professor George Davey Smith told BBC News Online that it was possible that children's bodies became accustomed to making do with inadequate nutrition early in life.
Then, when their nutrition levels improved, they were unable to do anything with the extra calories other than to deposit them as excess fat tissue.
Obesity is a major cause of both diabetes and heart disease.
Professor Davey Smith said: "People tend to focus on how many sausages you eat, or how many cigarettes you smoke as an adult.
"But the essential message here is that childhood health has a long term effect on your health as an adult."
A spokesman for the British Heart Foundation said coronary heart disease was associated with many controllable factors such as smoking and inactivity.
He said: "The exact role of genetics in CHD, that may also be responsible for leg length, are still not completely understood.
"This research also suggests healthy eating during pregnancy and childhood, which could affect growth, could be as important as during adulthood in reducing risks of CHD."
The research is published in the Journal of Epidemiology and Community Health.