Started in the prehistoric times the deer people lived in what would become Gotham City one of their oldest member Anthro had seen a God and had given him the power of fire when he was young Anthro then traveled all over the world where he spread fire before dying of old age in a cave (the very same that would become the Batcave).
They were continually attacked by the immortal Vandal Savage at numerous times. On the day of Antrho's death members of the tribe met a time displaced Bruce Wayne who came from the cave he had been sent back in time after the final battle with Darkseid. The tribe believed him to be one of the gods who Anthro had seen and also discovered the rocket sent back in time during Final Crisis with many mementos inside. Unable to speak to Bruce Wayne the tribe members named Bruce Wayne "Man of Bats" as numerous bats flew from the cave after he left it. The tribe gave Bruce some food but were attacked that night by Savage who killed some members and took a beaded necklace from one member. Bruce Wayne although amnesic still retained his heroic impulses and tried to stop Savage and his tribe before being subdued. Vandal Savage then intended to sacrifice Bruce Wayne on the site where he killed a giant bat to the Gods.
Unconscious Bruce dreamed of bats subconsciously remind of his vow and when he awoke he was saved by one of the last members of the tribe (Anthro's grandson) who used Bruce's utility belt. Bruce then awake and took the giant bat's remains on his head Bruce and the boy fought the group led by Savage. The two successfully beat Vandal Savage and stopped him he was ejected from his own group. Soon the effects of the Omega Sanction the same reason Bruce was sent back in time took Bruce to another time zone during the witch trials of Gotham.
Though gone Bruce Wayne's influence as Man of Bats was not forgotten the Miagani stopped being the deer people and became the Bat people. They carved a statue of The Man of Bats in the cave where he left his cape and cowl to be found by future heroes. The Miagani soon used rope traps to defend the cave from trespassers and wore masks similar to Bruce's cowl.
At some point Bruce Wayne was taken to the pirate era of Gotham and was taken hostage by a pirate named Thatch Black Beard and his pirates they believed him and Jon Valor to be the Black Pirate a crimefighter on the oceans. They expected they were attempting to throw Thatch and his group off the trail of treasure in Gotham's cave and took them as hostages. While in the caves many of the pirates were killed by the now Batman like Miagani. While Bruce wore the cloak of the Black Pirate to stop Thatch personally. After Thatch and his surviving ally left Bruce was described as familiar to the Miagani as the same man who saved them so long ago and it was clear they worshiped him. The Miagani protected the cave in anticipation of the "All-over" a terrible day to come. When Valor wrote his adventure with Bruce Wayne (whom he believed to be a ghost) some unknown people took the pages and placed it in a box with a bat on it's case. These people may well be Miagani or at least related to them. The same box was seen with Bruce during his witch hunter days on his time travel adventure it was painted with him under his portrait as.
It is clear now the Miagani have become use to the returns of Bruce Wayne and anticipate his return in times. During the late 1800's a family connected to the Miagani are killed except the mother for the Bat-Box in their possession. It is desired by Vandal Savage who hired the killers to retrieve it as the mother prays to God for retribution Bruce Wayne now a masked horse riding crimefighter in this era hears her pleas and goes to capture the killers. Bruce encounters them and due to his relentlessness is called a ghost by one the two outlaws the two then hire Jonah Hex for protection by order of Savage. They all retreat to Gotham City where Vandal Savage, Bruce Wayne's ancestor the devil worshiper Thomas Wayne are attempting to get information from a young woman, Catherine Van Derm (most likely one of the last Miagani) who knows the secrets of the Bat-Box but says something terrible will come from it. Bruce Wayne stops the outlaws one by one before ending with Savage, Thomas Wayne and Hex. Bruce saves Catherine from them when they attempt to escape on horse wagon the wagon crashes due to Catherine's retaliation in front of Alan Wayne, Bruce's great great grandfather. Bruce is recognized as Vandal Savage as Man of Bats before being subdued with Thomas Wayne.
Catherine recognizes Bruce Wayne from stories her grandfather's descriptions when he hands her a beaded necklace (the same from the Miagani's prehistoric encounter with Bruce Wayne) she then realizes he is the same man seen by the Miagani for years and gives him the Bat Box. It's contents shock Bruce but he then sees Jonah Hex who swore to carry his duty in a showdown Hex pulls the trigger of his gun before Bruce Wayne can throw a batarang and is shot and falls in the nearby river. The Omega Sanction then takes Bruce to 1978 Gotham City. Hex leaves with none of the gold to what was his last bounty.
Catherine and Alan Wayne soon get married and complete Wayne Manor it is asked by the girl to be a signal for Bruce Wayne's return as she believes he always returns. Catherine dies in childbirth when she delivers Bruce's great grandfather Kenneth Wayne.
In Return of Bruce Wayne it is suggested by Martha Wayne's mother that her pearl necklace (the same she wore on the night of her death) was a family heirloom from Thomas Wayne's family was the same necklace seen before with Anthro and the young woman who married Alan Wayne hinting that Bruce was descended from the Miagani themselves.
What eliminated the Miagani is said to be when they encountered the mysterious Blackfire they sensed an evil in him and were untrustworthy of him the Miagani tribe Chief demanded Blackfire leave before he killed the chief in a murderous rage. The Miagani captured Blackfire and attempted to kill him but discovered the man could not be killed so he was thrown in a cave by them with a totem to warn others of his evil. Soon the Miagani's crops died leaving no way they could continue to live they left Gotham and were soon killed by another tribe.
In the present days Dick Grayson as Batman, Damian Wayne and Alfred Pennyworth had become aware Bruce Wayne may have been sent back in time and set out to study Wayne Manor for any clues left behind. They discover Bruce Wayne's portrait in from his time as Mordecai Wayne further inspection shows that the Devil Worshiper Thomas Wayne may have helped summon a devil Bat from the Miagani tribe called Barbatos a long time ago in the 1700's. While investigating the Manor Dick discovered hidden tunnels and lairs connected to the cave as well as the carving of Bruce as Man of Bats. Dick finds the Bat-Box but is attacked (or he was possibly hallucinated) a giant bat that injured him. While on the site Doctor Hurt sent his minions to steal the Bat-Box from Dick and escaped. After returning to the caves Damian and Alfred also see the carving of Man of Bats as well as Bruce's cape and cowl confirming he was sent back in time.