Researchers from Glasgow University said high blood pressure, cholesterol and insulin levels are more likely to be found in adolescents who were overweight between the ages of nine and 12, increasing their risk of heart disease in future.
But children whose body mass returned to more normal levels saw their risk of problems decrease, according to the study in the British Medical Journal.
Campaigners said the research should send a message to parents and children that they could reduce the risk of future health problems by taking action to reduce obesity now.
Naveed Sattar, professor of metabolic medicine at Glasgow University, said: "One of the messages of the research is that kids who manage to normalise their weight between nine to 12 and 15 to 16, see their risks also normalise. Children who were normal weight at nine to 12 but became overweight had risks reasonably similar to those who remained overweight."
Prof Sattar said there would be children with "puppy fat" who would grow into their weight.
"But there are lots of other children, however, who are obese and will stay obese or will become obese."
The researcher said factors such as high insulin and high blood fats were most strongly linked to diabetes.
"Although they are at higher risk, not all kids will get diabetes but certainly they are on that trajectory and have a higher risk than the average population by the time they get to 30 or 40 if they carry on that way," he said.
Tam Fry, from the Child Growth Foundation, said: "This is another piece of evidence that points to the fact that we really are missing the full story on weight and obesity and we really have to try harder and earlier."
A total of 5,235 children took part in the research, all of them part of the Avon Longitudinal Study of Parents and Children (ALSPAC), which has tracked the health of more than 14,000 children since birth.
The researchers assessed the children's body mass index, waist circumference and fat mass between the ages of nine and 12. When the children reached 15 to 16, their blood pressure, cholesterol, glucose and insulin levels were tested.
The results showed that a high BMI aged nine to 12 was linked to a greater likelihood of having several heart disease risk factors later on.
Girls who were overweight or obese as children and teenagers had a 74 per cent increased risk of having high blood pressure compared to those of a normal weight.
For boys, those who were overweight or obese were 92 per cent more likely to have high blood pressure, and more than eight times more likely to have high insulin and high triglyceride levels.