Background: There is no data on the role of prophylactic antibiotics in patients undergoing medical thoracoscopy. Objective: In this study, we evaluated the efficacy and safety of a single dose of intravenous cefazolin in subjects undergoing medical thoracoscopy. Methods: Subjects undergoing medical thoracoscopy were randomized 1:1 to receive either intravenous cefazolin 2 g (antibiotic group) or intravenous saline (control group). The primary outcome was the incidence of infections (surgical site infections and empyema) in the study groups, while the secondary outcomes were complications related to intravenous antibiotics. Results: Of the 121 subjects screened, 100 (mean age ± SD: 52.2 ± 15.2 years; 38 [38%] women) were randomized to the study groups. The incidence of postprocedural infections was not different between the antibiotic and the control group (4 [8%] vs. 6 [12%], p = 0.28). Surgical site infection occurred in 1 subject (2%) in the antibiotic group and 3 subjects (6%) in the saline group (p = 0.62); empyema occurred in 3 subjects (6%) in each group (p = 1.00). There was no association between age, comorbid illness (diabetes mellitus or chronic kidney disease), study group allocation, type of thoracoscope used, duration of procedure, histological diagnosis (benign or malignant), and the occurrence of infections in the postprocedural period. Conclusion: The use of a single dose of cefazolin prior to medical thoracoscopy was not associated with a reduction in the occurrence of postprocedural infection.