Following the Second Opium War in 1860, one of Britain's treaty demands was for permanent diplomatic digs in Beijing, hence the Legation Quarter, a three-quarter square mile of inner city given over to foreign legations (embassies) in Beijing until WWII. Western-style banks, apartments, embassy gates and a church from that era survive to this day. Running eastwards from Tian'anmen Sq, Dongjiaomin Xiang (formerly Legation St) is the main drag into the area.
The Legation Quarter gained worldwide notoriety in the summer of 1900 as the site of a 55-day siege during the Boxer Rebellion. Following its liberation by the forces of an eight-nation alliance, the quarter was rebuilt, expanded and walled off from the rest of the city. Soldiers were garrisoned within, foreigners living inside were exempt from Chinese law, and Chinese themselves were forbidden to enter without a pass, which, it can be assumed, didn't do much for international relations.
Most of the former embassy sites are now occupied by the Chinese government, but you can explore the handsome parade ground of the American Legation, home to jazz den Blue Note and the upmarket Yunnan restaurant Lost Heaven. St Michael's Church, built in 1901 a year after the siege, attests to the expanding influence and power of the foreigners after the Boxer Rebellion.