Xuan Wu was the prince of a Chinese Emperor in Taoist legend. However, he was not interested in taking the throne, but decided to study in Tao's way. At age 15, he left his parents to search for enlightenment in Tao's way.
As many Chinese legends speak of certain animals becoming demons over time as they gain knowledge, that's what the tortoise and snake became, and terrorized people.
As Xuánwu, now in his god status, heard of this, he came and slayed the demons from his past. However, he did not kill them, as the snake and tortoise demons showed remorse.
He let them train under him and atone for their wrong doings, and they became the "Tortoise General" and "Snake General", and they assisted Xuánwu with his quests.
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.
It was said that he eventually achieved god status and was worshiped as a god of northern sky.
Since he was born he had been eating the food of the world, humanly food, therefore his stomach and intestines were still human.
Legend told of an event that a god came and changed out his human stomach and intestines for a godly body so he could fully achieve god status.
The stomach and intestines taken out by the god who did the surgery on Xuánwu were said to have taken on the shape of a tortoise (stomach) and a snake (intestines).
According to another source, once Xuánwu's had begun study of the way, he discovered that he must purge himself of all his past sins to become a god.
He learned to achieve this by washing his stomach and bowels (intestines) in the river.
In the washing of his internal organs, his sins melted from them and into the river in a dark, black form. These then formed into a black tortoise and snake who terrorized the people.
Once Xuánwu learned of this, he returned to conquer the forms of this past sins and subdue them under himself and they became his servants.
In Penang, Xuan Wu stood majestically in Penang Taochiew Ancestral Hall. Also in Batu Kawan, the Wan Shi Aun temple offers chicken eggs and kangkong or water convolvulus to the two generals on prayers days.
As Penang Taochiew Ancestral Hall is today a Unesco heritage site to visit, it is also good to note the the original statue of Xuan Wu is from the Batu Kawan Wan Shi Aun temple.
One of four creatures associated with the cardinal directions in Chinese mythological cosmology, the Xuanwu, (“dark warrior,” sometimes translated as “black warrior”) is a chimera-like hybrid animal with the head and tail of a snake and the body of a tortoise.
Unrelated to the twelve creatures of the Chinese zodiac, these four creatures each has its signature color, season, element, celestial quadrant, and other features:
Green or Blue Dragon of the East (Qinglong: spring, water)
Red Phoenix of the South (Zhuque: summer, fire)
White Tiger of the West (Baihu: autumn, metal)
Dark Warrior of the North (Xuanwu: winter, earth)
The fifth direction—that is, the center of the universe—in this cosmological map is China itself.
The origin of the cardinal-direction creatures is said to date back to the Warring States period (475–221 B.C.E.) and the Han dynasty (206 B.C.E.–220 C.E.).