The objective of this study is to evaluate the effectiveness of 68Ga-FAPI-04 PET/computed tomography (CT) for the diagnosis of primary and metastatic gastric cancer and colorectal cancer lesions as compared with 18F-FDG PET/CT. Fifty-nine patients who underwent both 18F-FDG and 68Ga-FAPI-04 for initial staging or restaging were enrolled. Histopathological findings and clinical imaging follow-up were used as the reference standard. The diagnostic performance and TNM staging of the two tracers were calculated and compared. The maximum standardized uptake value (SUVmax), tumour-to-mediastinal blood pool ratio (TBR) (lesions SUVmax/ascending aorta SUVmean), and tumour-to-normal liver parenchyma ratio (TLR) (lesions SUVmax/liver SUVmean) of primary and metastatic lesions between two imaging modalities were measured and compared using the Wilcoxon signed-rank test and paired t-test. The two imaging agents are comparable for the detection of primary tumors. The sensitivity of 68Ga-FAPI-04 PET/CT was higher than that of 18F-FDG PET/CT for detecting lymph node metastases, peritoneal metastases, liver metastases, and bone metastases. In the patient-based analysis, the TLR for all lesions was significantly higher with 68Ga-FAPI-04 PET/CT than with 18F-FDG PET/CT (all P < 0.05). The accuracy (92.2 vs. 70.3%, P = 0.002) and sensitivity of 68Ga-FAPI-04 were significantly higher than that of 18F-FDG (78.6 vs. 71.4%, P = 0.011) in determining the lymph node status. 68Ga-FAPI-04 has a higher accuracy in staging (P = 0.041), which is mainly due to the ability of distant metastases detection. 68Ga-FAPI-04 PET/CT may be superior in evaluating the diagnostic efficiency and staging accuracy of gastric and colorectal cancer.