Background: Various methods have been used to reduce postoperative pain after thoracic surgery. However, these methods may affect the patient's respiratory response and delay recovery from anesthesia. We aimed to evaluate the effects of fentanyl and remifentanil during extubation after video-assisted thoracic surgery (VATS). Methods: This study included 45 randomly-selected male patients who underwent VATS for pneumothorax between July 2011 and August 2012. We divided the participants into 3 groups: the F group, which received a bolus injection of 1.0 µg/kg of fentanyl; the R1 group, which received a 0.04 µg/kg/min remifentanil infusion; and the R2 group, which received a 0.08 µg/kg/min remifentanil infusion. Hemodynamics, pain, cough, consciousness level, and nausea were assessed for each group. Results: The number and severity of coughs were lower in the R1 and R2 groups than in the F group, and there were no differences between the R1 and R2 groups. Respiratory depression and loss of consciousness were not observed in any of the patients, and there were no differences in hemodynamics. Conclusion: In comparison with fentanyl, remifentanil did not result in a wide fluctuation of blood pressure and heart rate upon emergence from general anesthesia. Moreover, remifentanil contributed to cough suppression and postoperative pain control. Remifentanil seems to be a safe and effective analgesic after VATS.