A seven-point plan to reduce the risk of heart disease also protects against cancer, scientists have found.
Adhering to at least six of the "Life's Simple 7" list of lifestyle choices from the American Heart Association reduced the overall risk of cancer by 51%.
Adopting four of the recommendations led to a 33% reduction, compared with following none of them.
The Life's Simple 7 path to a healthy heart consists of being physically active, maintaining a healthy weight, eating a healthy diet, having healthy cholesterol levels, keeping blood pressure down, regulating blood sugar levels, and not smoking.
When smoking was taken out of the equation, following five or six of the remaining steps lowered cancer risk by a quarter.
"We were gratified to know adherence to the Life's Simple 7 goals was also associated with reduced incidence of cancer," said Dr Laura Rasmussen-Torvik, from Northwestern University in Chicago, who led a study of more than 13,000 American men and women.
Participants in the study, launched in 1987, were interviewed and examined to assess the effect of their lifestyles on heart risk.
After two decades 2,880 of them had developed cancer, mostly of the lung, bowel, prostate and breast.
Data from the heart study showed that the Life's Simple 7 guidelines also had an impact on cancer rates.
"This adds to the strong body of literature suggesting that it's never too late to change, and that if you make changes like quitting smoking and improving your diet, you can reduce your risk for both cardiovascular disease and cancer," Dr Rasmussen-Torvick added.
The findings are published in the American Heart Association journal Circulation.
A 2010 study of middle aged and older individuals found that following the Life's Simple 7 guidelines cut the chances of dying over a five-year period by more than half.