Metabolic changes and smoking are common among HIV patients and may confer increased cardiovascular risk. The aim of the study was to determine acute myocardial infarction (AMI) rates and cardiovascular risk factors in HIV compared with non-HIV patients in two tertiary care hospitals. We conducted a health care system-based cohort study using a large data registry with 3,851 HIV and 1,044,589 non-HIV patients. AMI rates were determined among patients receiving longitudinal care between October 1, 1996, and June 30, 2004. The primary outcome was myocardial infarction, identified by International Classification of Diseases coding criteria. AMI was identified in 189 HIV and 26,142 non-HIV patients. AMI rates per 1000 person-years were increased in HIV vs. non-HIV patients [11.13 (95% confidence interval [CI] 9.58-12.68) vs. 6.98 (95% CI 6.89-7.06)]. The HIV cohort had significantly higher proportions of hypertension (21.2 vs. 15.9%), diabetes (11.5 vs. 6.6%), and dyslipidemia (23.3 vs. 17.6%) than the non-HIV cohort (P < 0.0001 for each comparison). The difference in AMI rates between HIV and non-HIV patients was significant, with a relative risk (RR) of 1.75 (95% CI 1.51-2.02; P < 0.0001), adjusting for age, gender, race, hypertension, diabetes, and dyslipidemia. In gender-stratified models, the unadjusted AMI rates per 1000 person-years were higher for HIV patients among women (12.71 vs. 4.88 for HIV compared with non-HIV women), but not among men (10.48 vs. 11.44 for HIV compared with non-HIV men). The RRs (for HIV vs. non-HIV) were 2.98 (95% CI 2.33-3.75; P < 0.0001) for women and 1.40 (95% CI 1.16-1.67; P = 0.0003) for men, adjusting for age, gender, race, hypertension, diabetes, and dyslipidemia. A limitation of this database is that it contains incomplete data on smoking. Smoking could not be included in the overall regression model, and some of the increased risk may be accounted for by differences in smoking rates. AMI rates and cardiovascular risk factors were increased in HIV compared with non-HIV patients, particularly among women. Cardiac risk modification strategies are important for the long-term care of HIV patients.