Eklavya in the Mahabharata is the son of Nishada King Hiranyadhanu. His story begins when he approached Guru Dronacharya to learn the art of archery. Ekalavya was an excellent archer but Dronacharya refused to teach him.
Guru Drona refused to teach him because he did not belong to the warrior class (Kshatriya). But the real reason was Drona feared that Ekalavya will surpass his favorite student Arjuna.
Eklavya then installed a clay image of Dronacharya, took blessings and started practicing archery. In due course of time, he mastered the art of archery on his own.
One day Dronacharya saw a barking dog being quietened with arrows. Seven arrows where shot into the mouth of the dog without injuring it. Dronacharya was amazed at this demonstration of archery.
Upon searching, he found out that it was Ekalavya who had done this; as the dog was barking and disturbing his practice.
Guru Drona found that Eklavya was practicing archery in front of his clay image.
Guru soon realized that his unknown Shishya (student) was superior to Arjuna in archery.
As he did not want anyone superior to Arjuna, he asked the thumb on the right hand of Ekalavya as Gurudakshina.
Ekalvya immediately compiled and chopped of the thumb on his right hand.