Opioid dependence is a chronic and relapsing medical disorder with a well-established neurobiological basis. Opioid agonist treatments, such as methadone and the recently approved buprenorphine, stabilize opioid receptors and the intracellular processes that lead to opioid withdrawal and craving. Both methadone and buprenorphine have been proven effective for the treatment of opioid dependence and can contribute to a decreased risk of human immunodeficiency virus (HIV) transmission. In addition, a buprenorphine/naloxone combination appears to have a decreased potential for abuse or diversion, compared with that associated with methadone. Largely because of these properties, recent legislation now affords an unprecedented opportunity for general physicians to offer opioid agonist treatment through their offices. This review focuses on the neurobiological basis of opioid dependence, the rationale for methadone and buprenorphine treatments, and issues in prescribing these medications to patients with HIV infection.