Realgar- and cinnabar-containing AnGongNiuHuang Pill (AGNHP) is widely used for treating encephalopathy syndrome. However, it raises great safety concerns due to the adverse effects reported by arsenic or mercury poisoning. Although AGNHP has been generally recognized, little is known about the metabolism of arsenic and mercury and their resulting potential health risk in vivo. Thus, comparative pharmacokinetics and urinary excretion of arsenic and mercury were conducted in rats after oral administration of realgar, cinnabar and AGNHP, respectively. The contents of arsenic and mercury in rat blood and urine were determined by hydride-generation atomic fluorescence spectrometry (HG-AFS) after wet digestion. AGNHP significantly reduced the absorption of arsenic in blood and promoted urinary arsenic excretion. Whereas, it increased the blood mercury absorption and reduced urinary mercury excretion. No significant toxicity was observed in the clinical dose range of AGNHP. However, excessive exposure to arsenic and mercury may still pose risks especially by long-term or excessive medication. The results are helpful for the rational clinical applications of realgar- and cinnabar-containing TCMs.