When recovering from general anesthesia, upon removal of the endotracheal tube, patients may experience a high dynamic response in the circulatory system, along with choking and restlessness. This study was designed to study the effect of maintaining an intravenous infusion of remifentanil or propofol on the performance of general anesthesia, including on the cardiovascular response, choking and irritability at the end of general anesthesia. We treated 60 patients with combined inhalation and general anesthesia for lower esophageal cancer resection. When the surgery was complete, narcotic drug treatment ceased, oropharynx and endotracheal suctioning was performed with a simple breathing bag, and the patient was quickly sent to the anesthesia recovery room. In the recovery room, patients were randomly divided into three groups (N = 20): the control group (waiting for extubation), the remifentanil group (target-controlled infusion of remifentanil; the target plasma concentration was 3 ng/ mL) and the propofol group (target-controlled infusion of propofol; the target plasma concentration was 2 μg/mL). The results show that maintaining an intravenous infusion of remifentanil or propofol can reduce the hemodynamic response, choking and irritability observed at the end of palinesthesia after administration of general anesthesia upon removing the endotracheal tube. The patients in the remifentanil group were fully awake when extubating, and remifentanil intervention did not extend the recovery time. Therefore, a maintenance infusion of remifentanil during general anesthesia may be a better choice.