Acyclovir is used to treat the symptoms of chickenpox, shingles, herpes virus infections of the genitals (sex organs), the skin, the brain, and mucous membranes (lips and mouth), and widespread herpes virus infections in newborns. Acyclovir is also used to prevent recurrent genital herpes infections.