Background and Aims: Upper gastrointestinal bleeding (UGB) is an important precipitating factor for the development of hepatic encephalopathy (HE) in cirrhotic patients. The aim of this study was to evaluate the efficacy of lactulose in a controlled randomized trial for prophylaxis of HE after UGB. Patients and Methods: 128 cirrhotic patients with UGB were consecutively classified according to Child-Pugh criteria and randomized to receive lactulose (group A, n = 63) or no lactulose (group B, n = 65) treatment after the symptoms of active bleeding disappeared. Curative effects were observed for 6 days. Results: Two patients in group A and 11 in group B had developed HE; the incidence rates were 3.2 and 16.9% (χ2 5.2061, p < 0.05). After treatment, a significant increase in ammonia level and higher number connection test (NCT) in the non-lactulose group, median blood ammonia levels (60.0 vs. 52.0), p < 0.05, and median NCT (43 vs. 38), p < 0.05, were observed. Patients who had developed HE had a significantly higher baseline Child-Turcotte-Pugh score (10.15 ±1.82 vs. 6.35 ± 1.60, p < 0.05), alanine aminotransferase (111.25 ± 91.62 vs. 48.32 ± 47.45, p < 0.05), aspartate aminotransferase (171.42 ± 142.68 vs. 46.33 ± 42.68, p < 0.05), total bilirubin (73.44 ± 47.20 vs. 29.75 ± 22.08, p < 0.05), serum albumin (24.65 ± 5.04 vs. 33.43 ± 6.49, p < 0.05), plasma prothrombin time (22.18 ± 4.60 vs. 17.12 ± 4.62, p < 0.05), and lower hemoglobin level (72.31 ± 15.15 vs. 87.45 ± 19.79, p < 0.05) as compared to patients who did not develop HE. On unconditional logistic regression analysis, patients who had developed HE were significantly associated with a higher baseline Child-Turcotte-Pugh score (OR 9.92, 95% CI 1.94-50.63, p < 0.05) and lactulose therapy (OR 0.02, 95% CI 0-0.74, p < 0.05) but were not associated with other parameters. Conclusions: Lactulose is an effective prophylaxis agent of HE for cirrhotic patients who had developed UGB.