The association between injection drug use and human herpesvirus 8 (HHV-8) was examined to investigate bloodborne transmission of the virus. In all, 1905 injection drug users (IDUs) enrolled in a cross-sectional study were tested for K8.1 antibodies to HHV-8 lytic antigen. Logistic regression was used to adjust for demographic and sexual behavior variables. HHV-8 seroprevalence was 10% among women, 10% among heterosexual men, and 23% among men who have sex with men. In adjusted analyses, HHV-8 seroprevalence increased with longer duration of injection drug use for each of these groups (P = .01, P = .03, and P = .049 for trend, respectively). HHV-8 infection is relatively common among IDUs in San Francisco, and longer duration of injection drug use is associated with an increase in the risk of HHV-8 infection that is not explained by sexual behavior or demographic differences. These results are consistent with the occurrence of bloodborne transmission of HHV-8 among IDUs.