Aims. To investigate cerebral hemodynamics in cirrhotic patients with HE and to observe effects of treatment in cerebral hemodynamics and correlations among ammonia, cerebral hemodynamics, and cognitive function. Methods. There were four groups: healthy controls (group 1), cirrhosis without HE (group 2), cirrhosis with MHE (group 3), and cirrhosis with OHE (group 4). Ammonia and cerebral hemodynamics (by TCD) were assessed. Patients in group 3 were subsequently randomized to two subgroups: the control (group A) and the treated (group B, treated with lactulose for two months), and they were retested for ammonia and TCD after treatment. Results. Ammonia, Vm, Vd, PI, and RI were statistically different before treatment, and ammonia, PI, and RI levels paralleled the severity of HE (P < 0.05). In group B, Vd increased and ammonia, PI, and RI declined following treatment (P < 0.05), while there were no differences in group A (P > 0.05). Correlations were found between ammonia and Vd, PI, RI, NCT-A, and DST and also found between Vd, PI, RI, and NCT-A and DST (P < 0.05). Conclusions. This study revealed that cerebral hemodynamics were related to the severity of HE and cerebral autoregulation was impaired. There were tight correlations among ammonia, cerebral hemodynamics, and cognitive function, and, following treatment, cerebral hemodynamics improved.