Located in the east of Thang Long, the temple was built in the ninth century to worship Long Do, a saint of ancient Ha Noi. Legend has it that when King Ly Thai To moved the capital from Hoa Lu to Thang Long (now Ha Noi) in 1010, he tried to rebuild the citadel but it still collapsed repeatedly. The King assigned people to pray at the temple. After praying, he saw a white horse going out from the temple and leaving his foot-prints on the road. The King knew this was an omen, so he had the citadel designed to resemble the traces of the horse’s harness and finally it was successfully completed. Long Do was named the tutelary god of the Thang Long Citadel, and the building was named Temple of the White Horse.
Bach Ma Temple was renovated many times. According to an existing stele, it underwent large-scale renovations during the reign of Le Chinh Hoa (1680–1705) and was further repaired in the 20th year of the Minh Mang reign (1820-1841).
Passing through the wonderful old wooden doors of the temple, visitors see a statue of the legendary white horse and red-lacquered funeral palanquin. Along with architectural and historical value, it has many valuable artifacts such as stone steles, altars, shrines and statues.