Psychiatric disorders and medications may affect the cognitive performance of patients with cirrhosis and complicate the diagnosis and prediction of hepatic encephalopathy (HE). The aim of this study was to study the association of psychoactive medications with cognitive performance and their effects on the ability of tests to predict HE development in patients with cirrhosis referred for transplant evaluation. Cirrhosis details, psychiatric disorders, psychoactive medications, and any history of prior HE were recorded for patients with cirrhosis at 2 transplant centers. Patients were followed until the development of HE. Five cognitive tests—number connection test A (NCT-A), number connection test B, the digit symbol test (DST), the block design test, and the inhibitory control test (ICT)–were administered. A high lure score and a low ICT target score indicated poor performance. The cognitive performances of patients with psychiatric disorders/medications and patients without them were compared. A proportional hazards model was created with the time to HE as the outcome, and it was based on demographics, psychoactive medications, cirrhosis details, and individual cognitive scores. Patients with prior HE and patients without prior HE were then studied separately. One hundred fifty-five patients with a mean age of 57.5 ± 6.2 years and a mean Model for End-Stage Liver Disease (MELD) score of 15.1 ± 6.2 were included [prior HE, 48%; diabetes, 34%; selective serotonin reuptake inhibitors (SSRIs), 32%; opioids, 19%; and antipsychotics, 10%]. Prior HE and antipsychotics (but not opioids or diabetes) were associated with worse cognition. SSRI users had better NCT-A and DST performance. One hundred forty-eight patients were followed for a median of 182.5 days; 58 developed HE at a median of 99 days after inclusion. In the entire group, the model showed that prior HE (hazard ratio = 4.13), the MELD score (hazard ratio = 1.07), and a high lure score (hazard ratio = 1.04) decreased the time to HE, whereas the use of SSRIs (hazard ratio = 0.42), a high target score (hazard ratio = 0.95), and a high sodium level (hazard ratio = 0.89) increased the time to HE. For patients without prior HE, the MELD score (hazard ratio = 1.25) and lures (hazard ratio = 1.09) predicted the time to HE. Lures (hazard ratio = 1.03), targets (hazard ratio = 0.96), and sodium (hazard ratio = 0.87) were associated with the time to HE in patients with prior HE. In conclusion, cognitive tests (particularly the ICT) remain valid predictors of HE in the face of psychiatric diseases and medications. SSRI use is associated with better cognitive performance and a reduced likelihood of developing HE. Liver Transpl 18:1179–1187, 2012. © 2012 AASLD.