We have previously demonstrated an association between combination antiretroviral therapy and the risk of myocardial infarction. It is not clear whether this association differs according to the class of antiretroviral drugs. We conducted a study to investigate the association of cumulative exposure to protease inhibitors and nonnucleoside reverse-transcriptase inhibitors with the risk of myocardial infarction. We analyzed data collected through February 2005 from our prospective observational study of 23,437 patients infected with the human immunodeficiency virus. The incidence rates of myocardial infarction during the follow-up period were calculated, and the associations between myocardial infarction and exposure to protease inhibitors or nonnucleoside reverse-transcriptase inhibitors were determined. Three hundred forty-five patients had a myocardial infarction during 94,469 person-years of observation. The incidence of myocardial infarction increased from 1.53 per 1000 person-years in those not exposed to protease inhibitors to 6.01 per 1000 person-years in those exposed to protease inhibitors for more than 6 years. After adjustment for exposure to the other drug class and established cardiovascular risk factors (excluding lipid levels), the relative rate of myocardial infarction per year of protease-inhibitor exposure was 1.16 (95% confidence interval [CI], 1.10 to 1.23), whereas the relative rate per year of exposure to nonnucleoside reverse-transcriptase inhibitors was 1.05 (95% CI, 0.98 to 1.13). Adjustment for serum lipid levels further reduced the effect of exposure to each drug class to 1.10 (95% CI, 1.04 to 1.18) and 1.00 (95% CI, 0.93 to 1.09), respectively. Increased exposure to protease inhibitors is associated with an increased risk of myocardial infarction, which is partly explained by dyslipidemia. We found no evidence of such an association for nonnucleoside reverse-transcriptase inhibitors; however, the number of person-years of observation for exposure to this class of drug was less than that for exposure to protease inhibitors. Copyright 2007 Massachusetts Medical Society.