On 22 August 1861, in the wake of the Second Opium War, the Xianfeng Emperor died at the Rehe Traveling Palace ( ), 230 kilometers northeast of Beijing, where he and his imperial court had fled to when the Anglo-French forces closed in on the Forbidden City.