Objective: To determine the factors associated with in-hospital mortality and the appropriate timing of operation in patients with infective endocarditis undergoing cardiac surgery. Methods: Cross-sectional study in patients admitted to the Heart Institute from 01/01/2021 to 31/12/2023 who had a diagnosis of infective endocarditis and had undergone cardiac surgery within the same hospital admission. Results: 128 patients (87 men, age: 44,8 ± 15,8 years) were enrolled. Streptococcus (37,5%) and Enterococcus (12,5%) were the most frequent pathogen agents. Aortic valve replacement and mitral valve replacement or repair were the main procedures. In-hospital mortality was 6.3%. The factors associated with in-hospital mortality included the presence of a prosthetic valve or pulmonary artery graft, abscess and/or fistula, and severe heart failure necessitating urgent operation. Preoperative duration of antibiotic therapy >21 days vs ≤21 days, and >14 days vs ≤14 days had no influence on in-hospital mortality. There was no infective endocarditis relapse. While waiting for cardiac surgery, the cumulative incidence of embolic events rose markedly beginning from the 3rd week after antibiotic therapy initiation. Conclusions: Factors associated with in-hospital mortality should be taken into account in the preoperative risk assessment. Patients with infective endocarditis who have indication for cardiac surgery and favorable response to antibiotic therapy should be operated after 2 weeks of antibiotic treatment.