Objective: To determine the causes of esophageal ulceration, the response rate to currently available therapies, and the long-term outcome in patients with human immunodeficiency virus (HIV) infection. Design: Prospective cohort study. Setting: An urban county hospital. Patients: Consecutive patients with HIV infection and endoscopically detected esophageal ulceration during a 4- year period. Intervention: Causes of ulcers were determined from clinical, endoscopic, and pathologic findings. Standard medical therapies for the identified causes were instituted, and ulcer healing was endoscopically confirmed when possible. Measurements: Symptomatic and endoscopic response to therapy and long-term outcome, including survival. Results: 100 patients with esophageal ulcer were identified. Ulcers caused by cytomegalovirus alone were the most common (n = 45); idiopathic ulcers were almost as frequent (n = 40). Herpes simplex virus esophagitis alone was identified as a cause in only 5 patients. Several potential causes of ulcer were found in 5 patients, including Candida esophagitis in 27 patients. Ten patients developed more than one cause of ulceration during long-term follow-up. Eighty-five patients had specific medical therapy for their identified disorders and had an overall response rate of 98%. Median survival from time of diagnosis was 8.9 months (range, 2 days to > 42 months). A difference in median survival was found between patients with cytomegalovirus esophagitis and those with idiopathic esophageal ulcer (7.6 months compared with 13.1 months; P = 0.03). Conclusions: Given 1) the broad spectrum of causes of esophageal ulceration, 2) that each of these causes requires specific therapy, and 3) the apparent high response rate, it is important to do endoscopic evaluation with mucosal biopsy in patients with HIV infection so that a diagnosis can be established and appropriate therapy instituted. Despite effective therapy, long-term survival is poor, however, long-term remission and survival may occur in some patients.