Lamivudine (Epivir) is used along with other medications to treat human immunodeficiency virus (HIV) infection. Lamivudine (Epivir-HBV) is used to treat hepatitis B infection. Lamivudine is in a class of medications called nucleoside reverse transcriptase inhibitors (NRTIs)