Glucagon-like peptide-1 receptor agonists (GLP-1 RAs) are increasingly used for the treatment of type 2 diabetes mellitus (T2DM) given their extra-pancreatic effects. However, there are concerns about carcinogenesis in the pancreas and thyroid gland. We aimed to evaluate the site-specific incidence of cancer in patients with T2DM-treated GLP-1 RAs using a nationwide cohort. This study included data obtained from the Korean National Health Insurance Service (between 2004 and 2021). The primary outcome was newly diagnosed cancer, and the median follow-up duration for all participants was 8 years. After propensity score matching, 7,827 participants were analyzed; 2,609 individuals each were included in the GLP-1 RA, diabetes mellitus (DM) control, and non-DM control groups. The incidence rate ratio (IRR) of subsequent cancer in patients with T2DM was 1.73, which was higher than that of individuals without DM, and it increased in both men and women. Analysis of patients with T2DM showed no increased cancer risk associated with the use of GLP-1 RA, and similar results were observed in both men and women. The IRRs of pancreatic cancer (0.74), thyroid cancer (1.32), and medullary thyroid cancer (0.34) did not significantly increase in the GLP-1 RA group compared with those in the DM control group. There was a 73% higher risk of cancer in patients with T2DM compared with the general population. However, among patients with T2DM, there was no association between the use of GLP-1 RAs and new-onset cancers, including pancreatic and medullary thyroid cancers.