Background: Cryptococcus is the most common cause of adult meningitis in Africa. We assessed the safety and microbiological efficacy of adjunctive sertraline, previously shown to have in-vitro and in-vivo activity against cryptococcus. Methods: In this open-label dose-finding study, we recruited HIV-infected individuals with cryptococcal meningitis who presented to Mulago Hospital in Kampala, Uganda between Aug 14, 2013, and Aug 30, 2014. To assess safety and tolerability, the first 60 participants were given sertraline at escalating doses of 100 mg/day, 200 mg/day, 300 mg/day, or 400 mg/day as induction therapy for 2 weeks, followed by consolidation therapy with 200 mg/day for an additional 8 weeks. From Nov 29, 2013, participants were randomly assigned (1:1) to receive open-label sertraline at predetermined doses of 200 mg/day, 300 mg/day, or 400 mg/day as induction therapy for 2 weeks, followed by consolidation therapy with 200 mg/day for 8 weeks. Dose assignment was made via computer-generated, permuted block randomisation stratified by antiretroviral therapy (ART) status for people with a first episode of meningitis. The primary outcome was 2-week cerebrospinal fluid (CSF) clearance rate of cryptococcus, termed early fungicidal activity, measured in patients with a first episode of culture-positive meningitis and two or more CSF cultures. This study is registered with ClinicalTrials.gov, number NCT01802385. Findings: Of the 330 individuals assessed, 172 HIV-infected adults with cryptococcal meningitis were enrolled. We gave 100 mg/day sertraline to 17 patients, 200 mg/day to 12 patients, 300 mg/day to 14 patients, and 400 mg/day to 17 patients. 112 participants were randomly assigned to receive sertraline at 200 mg (n=48), 300 mg (n=36), or 400 mg (n=28) daily for the first 2 weeks, and 200 mg/day thereafter. The final population consisted of 17 participants in the 100 mg group, 60 in the 200 mg group, 50 in the 300 mg group, and 45 in the 400 mg in group. Participants receiving any sertraline dose averaged a CSF clearance rate of -0·37 colony forming units per mL per day (95% CI -0·41 to -0·33). Incidence of paradoxical immune reconstitution inflammatory syndrome was 5% (two of 43 newly starting ART) and no cases of relapse occurred over the 12-week study period. 38 (22%) of 172 participants had died at 2 weeks, and 69 (40%) had died at 12 weeks. Six grade 4 adverse events occurred in 17 participants receiving 100 mg, 14 events in 60 participants receiving 200 mg, 19 events in 50 participants receiving 300 mg, and eight events in 45 participants receiving 400 mg. Grade 4 or 5 adverse event risk did not differ between current US Food and Drug Administration-approved dosing of 100-200 mg/day and higher doses of 300-400 mg/day (hazard ratio 1·27, 95% CI 0·69-2·32; p=0·45). Interpretation: Participants receiving sertraline had faster cryptococcal CSF clearance and a lower incidence of immune reconstitution inflammatory syndrome and relapse than that reported in the past. This inexpensive and off-patent oral medication is a promising adjunctive antifungal therapy. Funding: National Institutes of Health, Grand Challenges Canada.