Founded in 1864 by the legendary Kapitan Yap Ah Loy, the temple is unique because it is dedicated to local human figures rather than traditional Chinese deities. The two main deities, Sin Sze Ya (Seng Meng Lee) and Si Sze Ya (Chung Piang), were military commanders who guided Yap Ah Loy during the Selangor Civil War.
Seng Meng Lee was a mentor to Yap, and legend says that when he was executed, white blood flowed from his body—a sign of his divinity. Yap believed the oracles of these two men provided him with the strategic guidance needed to survive the war and build Kuala Lumpur into a thriving town. For over 160 years, the temple has served as the social and spiritual heart of the city's Chinese community, even functioning as a center for dispute settlement in the early days. In 2020, it was officially declared a National Heritage Site.