The scientists believe that drinking alcohol and exercising share a similar metabolic pathway in the body but operate in opposing directions. Alcohol forces the liver to abandon its work getting rid of fatty acids, exercise does the reverse, using up fat as fuel. So drinking is damaging to health but exercise is protective.
Dr Annie Britton, from the department of epidemiology and public health at UCL, said: "Our results provide an additional argument for the role of physical activity as a means to promote the health of the population even in the presence of other less healthy behaviours."
The study looked at six health surveys involving 36,370 people in England and Scotland, carried out between 1994 and 1998, which included questions about drinking and activity levels among those aged over 40. During the study period nearly 6000 people died.
The researchers found that the chance of developing cancer and dying early rose steadily as people consumed more alcohol.
However, British experts warned that people should not think they can drink what they want and then off-set it with exercise.
Kevin McConway, of The Open University, said: "Does this mean that I don't have to worry about the effect of drinking on my health, as long as I get enough exercise? Well, no it doesn't.
"Maybe the people who exercised a lot tended to have different diets, or different drinking patterns, and maybe that is what changed the risk pattern and not the exercise at all."
Other experts said it was difficult to know if people had been accurate in their estimates of both alcohol intake and exercise.
The research was published in the British Journal of Sports Medicine.