The goat was a humble creature in everyday life back in the days when Chinese astrology first evolved, but it had an illustrious ancestor in legend. This was the semi-divine Xiezhi or unicorn goat, the most famous of which belonged to the Emperor Shun in the third millennium BC. Shun is famous for introducing the first codes of law into China. They were implemented by his Justice Minister Gao Yao but even Gao Yao in all his wisdom could not always decide the truth of a case, and then he would call for the unicorn goat to be brought. She would infallibly choose the guilty party by butting them with her horn.
Above is shown an ancient carving of a charging Xiezhi from Gansu Province, west of Beijing.