In times of Mahabharata, the surrounding area of Dakor constituted the 'Hidamba' van (jungle). It was a very dense jungle. It was pleasant and rich with streams and lakes. It had become an attraction for the sages to establish their hermitage for penance. Likewise, Dank Rishi had his hermitage (ashram) in this area. During penance Lord Shiva was pleased with him and asked him to demand something. Thereupon, Dank Rishi requested Lord Shiva to remain permanently in his hermitage. Lord Shiva agreed to his request. He disappeared and left behind him His replica in the form of Ban (Ling), which is known as Danknath Mahadev. Thus in ancient times, Dakor was known as 'Dankor' after the name of Danknanth Mahadev. It was also known as khakhariya because of many khakhra(palash) trees in the vicinity.
The present Dakor owes its current fame not to Dank Rishi but to Bodana, a great devotee of Lord Krishna. In his previous birth, he is supposed to have lived in Gokul and been a cowherd called Vijayanand. On one 'Holi’ day, all the cowherds except Vijyanand worshipped Lord Krishna. His wife too worshipped Lord Krishna. But Vijayanand was proud and stayed at home. Lord Krishna came to his house in disguise of his friend and sent him to perform 'Holi' puja. Coming back, he realised that his friend was none else but Lord Krishna. Next day they fought a battle of colour. Lord Krishna lost and fell into the river. Vijyanand went after him where Lord Krishna revealed his true self. Vijyanand begged forgiveness. Lord Krishna took pity on him and solaced him with a boon that he would be born in Gujarat again in Kaliyuga after 4200 years as Vijayanand Bodana in the house of a Krishatriya and his present wife Sudha would again be his wife, called Gangabai, when he will give them a glimpse (darshna) and relieve them by offering them emancipation (Moksha). So as the legend would have it, 'Vijayanand Bodana', a rajput of Dakor, becomes a staunch devotee of Lord Krishna. He used to let the Tulsi grow in an earthen pot with him on his palm and used to go every six months to Dwaraka to worship Lord Krishna with the said Tulsi leaves. He did this continuously, unfailingly and untiringly till he was 72 years he then began to find it increasingly difficult to pursue this ritual. Seeing his plight, Lord Krishna told him that on his ensuing visit to Dwaraka, he should bring a bullock-cart with him and Lord Krishna would accompany him to Dakor as he was exceedingly pleased with his devotion. Accordingly, Bodana went with bullock-cart to Dwaraka. The hereditary priests of Dwaraka (Gugli brahmins) asked him as to why he had brought a cart with him. Whereupon, Bodana replied that he had done so to take away Lord Krishna. Looking to the ramshackle cart, they did not believe him but nevertheless locked and sealed the sanctum sanctorum of Dwaraka Temple for the night. At mid night, Lord Krishna broke open all the doors, awoke Bodana and told him to take him to Dakor. Shortly afterwards, Lord Krishna called upon Bodana to rest in the bullock-cart and drove the cart himself till reached the vicinity of Dakor. Here (near Bileshwar Mahadev on Dakor-Nadiad road) they rested for some time, touching and holding a branch of neem tree. He woke up Bodana and asked him to take over. Since that day, this neem tree is found to have one sweet branch though the rest of the branches are bitter and it forms the subject of a well-known Gujarati song (bhajan).
In Dwaraka, the Gugli brahmins finding the deity missing chased Bodana and came to Dakor in pursuit. Bodana was frightened but Lord Krishna told him to hide the deity in the Gomati tank and meet the Guglis. Accordingly, Bodana hid the deity and went to meet the Guglis with a pot of curd to pacify them. They became angry and one of them threw a spear at him. He fell down dead while hurting Bodana with a spear it also hurt the deity hidden in Gomati tank and the water turned red with Lord Krishna's (Ranchhodraiji's) blood. It is said that even today the earth of Gomati tank where the image lay is red while rest of the tank is of brown mud. In the midst of Gomati tank, over the place where Lord Krishna was hidden, a small temple having the Lord's foot-prints is constructed and this temple is linked with the bank of Gomati Tank by a bridge.
Even with the death of Bodana, the Guglis were not appeased. Requesting Lord Krishna to return to Dwaraka, they sat on the bank of Gomati tank and went on a hunger strike. At last, Lord Ranchhodraiji (Krishna) directed Gangabai, wife of Bodana, to give gold equivalent of his weight and ask the Guglis to return to Dwaraka. Poor lady, the widow of Bodana, was a pauper and could not afford doing so. By a miracle, the deity became as light as a golden nose-ring (1, 1/4 val i.e.1/2 gram in weight) which was all that the widow of Bodana, Gangabai, had. The Guglis were disappointed but the Lord mercifully directed that they would find after six months an exact replica of the deity in Sevaradhan Vav (well with steps) at Dwaraka. The impatient Guglis looked for the deity sometime earlier than they were told and as a result, found deity which, though similar to the original one, was smaller.
Pilgrims to Dakor still visit the places stated to have been associated with the legend i.e – a)the branch of neem tree under which Lord rested while coming to Dankpur which subsequently turned sweet; b) the deity was hidden in the Gomati tank; c) the balance which was set up to weigh the original deity which Bodana had enshrined.