Diabetes mellitus and cancer are two growing health problems. They have in common many modifiable risk factors including sex, age, obesity, physical activity, diet, alcohol, and smoking, and have a long latency before overtly manifesting. Patients with diabetes experience a roughly 20-25% higher cancer incidence compared to individuals without diabetes, and it depends on cancer site. Moreover, patients with diabetes who further develop cancer have increased early and late mortality in comparison with cancer patients without diabetes. Prediabetes and metabolic syndrome are also related to an increased risk of developing and die from cancer. Possible mechanisms linking diabetes and prediabetes with cancer include hyperglycemia (endogenous or exogenous), hyperinsulinemia, and alterations of insulin-like growth factor system, chronic subclinical inflammation, abnormalities in sex hormone metabolism, and adipokines. It becomes crucial to define the right orientation of the associations between diabetes and cancer in order to identify the modifiable pathogenic mechanisms. The common soil hypothesis claims that prediabetes and diabetes, as well as metabolic syndrome, may be considered a surrogate sign for dietary risk factors of cancer. The clepsydra of foods may help choose foods associated with healthy benefit while avoiding foods associated with harm, including cancer.