Xuan Wu was originally a butcher who had killed many animals unremorsefully. As days passed, he felt remorse for his sins and repented immediately by giving up butchery and retired to a remote mountain for cultivation of the Tao.
One day while he was assisting a woman in labor, while cleaning the woman’s blood stained clothes along a river, the words "Xuan Tian Shang Di" appeared before him. The woman in labor turned out to be a manifestation of the goddess Guan Yin. To redeem his sins, he dug out his own stomach and intestines and washed it in the river. The river turned into a dark, murky water. After a while, it turned into pure water.
Unfortunately, Xuan Wu does indeed loses his own stomach and intestines while he was washing it in the river. The Jade Emperor was moved by his sincerity and determination to clear his sins; hence he became an Immortal known with the title of ''Xuan Tian Shang Ti''.
After he became an immortal, his stomach and intestines after absorbing the essences of the earth, it was transformed into a demonic turtle and snake which harmed people and no one could subdue them. Eventually Xuan Wu returned back to earth to subdue them and later uses them as his means for transportation.
Xuan Wu is portrayed as a warrior in imperial robes, his left hand is in the "three mountain hand seal", somewhat similar to Guan Yu's hand seal, while the right hand holds a sword, which is said to have belonged to Lü Dongbin, one of the Eight Immortals.
Another legend says that he borrowed the sword from Lü Dongbin to subdue a powerful demon, and after being successful, he refused to bring it back after witnessing the sword's power. The sword itself would magically return to its owner if Xuan Wu released it, so it is said that he always holds his sword tightly, and is unable to release it.
He is usually seated on a throne with the right foot stepping on the snake and left leg extended stepping on the turtle. His face is usually red with bulging eyes. His appearance also causes most people to accidentally mistake him as Guan Yu.
His birthday is celebrated on the third day of the third lunar month.
Generals Wan Gong and Wan Ma
Xuan Wu is sometimes portrayed with two generals standing besides him, General Wan Gong and General Wan Ma （萬公, 萬媽). Most temples that are dedicated Xuan Wu also have Generals Wan Gong and Wan Ma, especially in Malaysia. The two generals are deities that handles many local issues from children's birth, medication, family matters as well as feng shui consultation. The Malaccans particularly in Batu Berendam County have deep faith in the generals due to their many good deeds and contribution to the local villagers.
In ''Journey to the West''
In the classic novel ''Journey to the West'', Xuánwǔ was a king of the north who had two generals serving under him, a "Tortoise General" and a "Snake General". This king had a temple at Wudang Mountains in Hubei, thus there is a Tortoise Mountain and a Snake Mountain on the opposite sides of a river in Wuhan, the capital of Hubei.