The number of cancer survivors worldwide is increasing every year, making secondary primary cancers (SPC) is a growing health threat. Studies have been conducted to investigate the risk of occurrence between digestive system tumors (DST) and thyroid cancer (TC). However, existing studies have tended to focus more on the risk of developing SPC and less on the impact of SPC on the survival of cancer survivors. In this study, using the Surveillance, Epidemiology, and End Results database, we aimed to explore the impact of TC on the survival of patients with DST by data between 2000 and 2018. The study employed the standardized incidence ratio to assess the relative risk of SPC, propensity score matching was conducted to mitigate confounding effects, Kaplan-Meier, Cox proportional risk model and competitive risk model were used to analyze the factors affecting the overall survival and cancer-specific survival. We furthermore explored the influence of pathological types and radiotherapy of TC on the survival of DST patients. 518,901 patients with DST only, 801 patients with TC occurring earlier than DST (TC-1st), and 744 patients with DST occurring earlier than TC (DST-1st) were included. The total incidence rate of small intestine cancer after TC was higher than that of the general population, and the incidence of TC after DST was higher than in the general population. DST patients with a history of TC had better overall survival and lower cancer-specific mortality and this difference was particularly significant in patients with DST-1st. In addition, radiotherapy for TC had no effect on cancer-specific mortality in patients with DST.