Objective: Plasma dipeptidyl peptidase-4 (DPP4) levels were significantly lower in patients with colorectal and liver cancers, and animal studies also showed DPP4 inhibitors (DPP4is) have procarcinogenic effects in colorectal cancer. Until now, whether DPP4is therapy affects the progression of liver cancer and colorectal cancer in patients with T2DM has not been well investigated. We investigated the association between cumulative defined daily dose (cDDD) of DPP4is exposure and risks of liver and colorectal cancers in patients with type 2 diabetes. Materials and Methods: We identified 268,520 patients with diabetes receiving DPP4is as second-line agents between March 1, 2009, and December 31, 2013, from Taiwan’s National Health Insurance Research Database, Taiwan Cancer Registry, and National Death Registry of Taiwan. The amount of DPP4is were divided into three groups (low, medium, and high) based on the interquartile range of the cDDD of the DPP4is. Results: The data showed that the low cDDD of DPP-4is was associated with a reducing risk of colorectal cancer [adjusted odds ratio (OR), 0.49; 95% CI, 0.32–0.75; P=0.001]. However, the high cDDD of DPP-4is was associated with an increasing risk of colorectal cancer (adjusted OR, 1.86; 95% CI, 1.32–2.61; P<0.001). No association between DPP4is use and liver cancer risk was observed. Conclusions: This nested case study revealed a J-shaped association between the cDDD of DPP-4is and colorectal cancer risk, but not liver cancer risk. Therefore, the effects of long-term DPP4is use on colorectal cancer risk warrant further study.