A majority of esophagogastroduodenoscopy (EGD) and colonoscopy procedures are performed under sedation, with the intravenous administration of a hypnotic agent combined with an opioid analgesic agent. The goal of our study was to establish the quality and plausibility of target-controlled infusion (TCI) as a sedation mechanism for upper and lower gastrointestinal (GI) endoscopies. A randomized, single-blinded, controlled clinical trial was arranged in a local community hospital. In total, 100 adult outpatients scheduled for upper and lower GI endoscopies were included and randomly allocated to a control group (n=50) and a TCI group (n=50). The sedation quality was assessed using the simplified quality of an anesthesia scoring system. Categorical parameters were compared using Pearson's chi-square test. Continuous parameters that were normally distributed were further compared using Student's t-test, and the others were compared using the Mann-Whitney test. The significantly lower anesthesia quality score in the TCI group (12.2 vs. 12.7) indicated that the anesthesia quality was better in this group. This study showed that sedation using TCI for GI endoscopy provided safe and effective sedation and was associated with a better sedation quality. We believe that TCI can be used to provide routine sedation for patients receiving GI endoscopy.