To determine the prevalence of cardiac abnormalities in patients with human immunodeficiency virus (HIV) infection, two-dimensional Doppler echocardiography was performed on 70 consecutive patients with HIV infection, including 51 with acquired immunodeficiency syndrome (AIDS), 13 with AIDS-related complex and 6 with asymptomatic HIV infection. Of the 70 patients, 36% were hospitalized and 64% were ambulatory at the time of evaluation. The average age was 37 years; 93% were homosexual men. Echocardiographic findings included dilated cardiomyopathy in eight patients (11%), pericardial effusions in seven patients (10%) (one with impending tamponade), pleural effusion in four patients (6%) and mediastinal mass in one patient (1%). Among the 25 hospitalized patients, echocardiographic abnormalities were noted in 16 (64%), whereas among the 45 ambulatory patients, the only abnormality noted was mitral valve prolapse in 3 patients (7%) (p less than 0.0001). Dilated cardiomyopathy was the only echocardiographic lesion more common in the 25 hospitalized patients than in 20 hospitalized control patients with acute leukemia. Symptoms of congestive heart failure responded to conventional therapy. Cardiac lesions were associated with active Pneumocystis carinii pneumonia and low T helper lymphocyte counts. Dilated cardiomyopathy of unknown origin may be more common than was previously recognized in hospitalized, acutely ill patients with AIDS, but is uncommon in ambulatory patients with HIV infection. Echocardiography should be considered in the evaluation of dyspnea in hospitalized patients with HIV infection, especially those with dyspnea that is out of proportion to the degree of pulmonary disease.