The co-existence of stroke and HIV has increased in recent years, but the impact of HIV on post-stroke outcomes is poorly understood. We examined the impact of HIV on inpatient mortality, length of acute hospital stay and complications (pneumonia, respiratory failure, sepsis and convulsions), in hospitalized strokes in Thailand. All hospitalized strokes between 1 October 2004 and 31 January 2013 were included. Data were obtained from a National Insurance Database. Characteristics and outcomes for non-HIV and HIV patients were compared and multivariate logistic and linear regression models were constructed to assess the above outcomes. Of 610 688 patients (mean age 63·4 years, 45·4% female), 0·14% (866) had HIV infection. HIV patients were younger, a higher proportion were male and had higher prevalence of anaemia (P < 0·001) compared to non-HIV patients. Traditional cardiovascular risk factors, hypertension and diabetes, were more common in the non-HIV group (P < 0·001). After adjusting for age, sex, stroke type and co-morbidities, HIV infection was significantly associated with higher odds of sepsis [odds ratio (OR) 1·75, 95% confidence interval (CI) 1·29–2·4], and inpatient mortality (OR 2·15, 95% CI 1·8–2·56) compared to patients without HIV infection. The latter did not attenuate after controlling for complications (OR 2·20, 95% CI 1·83–2·64). HIV infection is associated with increased odds of sepsis and inpatient mortality after acute stroke.