Diabetes is a disorder of energy metabolism associated with increased cancer risk, but the underlying mechanism is poorly understood. In a prospective cohort of patients enrolled in the Hong Kong Diabetes Registry, we explored risk factors for cancer including drug usage in type 2 diabetes. In a series of published papers, we reported a linear risk association of cancer with glycated haemoglobin with a threshold at 6.0%-6.5% and non-linear risk associations of body mass index, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol, triglyceride and white blood cell (WBC) count in V-shaped or A-shaped manners. Detailed pharmacoepidemiological analysis revealed markedly attenuated cancer risk in patients treated with insulin and oral anti-diabetic drugs compared with non-users of these drugs. We further observed significant drug-subphenotype interactions with attenuated cancer risk in metformin users with low high-density lipoprotein cholesterol, renin-angiotensin system (RAS) inhibitor users with high WBC count and statin users with co-presence of low low-density lipoprotein cholesterol plus albuminuria or low triglyceride. These novel observations corroborate with experimental findings of possible consequences of hyperglycaemia on dysregulation of cholesterol metabolism, renin-angiotensin system and adenosine 5'-monophosphate-activated protein kinase pathways, all of which may be implicated in carcinogenesis. On the basis of these epidemiological and experimental findings, we argue for the strong need to strengthen the health care system to ensure that type 2 diabetes subjects receive appropriate drugs to optimize internal milieu to reduce all events including cancer. Apart from mechanistic studies, large-scale, randomized clinical trials using medications such as statin, renin-angiotensin system inhibitors and metformin in patients with risk-conferring subphenotypes are needed to confirm their anti-cancer effects.