Ammonia is considered to be the main neurotoxin responsible for hepatic encephalopathy resulting from liver failure. Liver failure has been reported to alter expression and activity of P-glycoprotein (P-gp) and multidrug resistance-associated protein 2 (Mrp2) at the blood-brain barrier (BBB). The aim of this study was to investigate whether ammonia is involved in abnormalities of expression and activity of P-gp and Mrp2 at the BBB. Hyperammonemic rats were developed by an intraperitoneal injection of ammonium acetate (NH4 Ac, 4.5 mmol/kg). Results showed that Mrp2 function markedly increased in cortex and hippocampus of rats at 6 h following NH4 Ac administration. Significant increase in function of P-gp was observed in hippocampus of rats. Meanwhile, such alterations were in line with the increase in mRNA and protein levels of P-gp and Mrp2. Significant increase in levels of nuclear amount of nuclear factor-κB (NF-κB) p65 was also observed. Primarily cultured rat brain microvessel endothelial cells (rBMECs) were used for in vitro study. Data indicated that 24 h exposure to ammonia significantly increased function and expression of P-gp and Mrp2 in rBMECs, accompanied with activation of NF-κB. Furthermore, such alterations induced by ammonia were reversed by NF-κB inhibitor. In conclusion, this study demonstrates that hyperammonemia increases the function and expression of P-gp and Mrp2 at the BBB via activating NF-κB pathway. Hyperammonemia, a proverbial main factor responsible for neurocognitive disorder and blood-brain barrier (BBB) dysfunction resulting from liver failure, could increase the expression and activity of P-glycoprotein and multidrug resistance-associated protein 2 (Mrp2) at the BBB both in vivo and in vitro. Furthermore, the NF-κB activation stimulated by hyperammonemia may be the potential mechanism underlying such abnormalities induced by hyperammonemia.