Yahya (Peace be upon Him) was the son of Prophet Zakariyya (Peace be upon Him). His birth was a miracle because he was born of a barren mother and an aged father. He was mentioned in the chapters of the Qur’an such as Surah Ale Imran, Anam, Maryam and Anbiya. Among all the heavenly scholars and the prophets of the Bani Israel, prophet Yahya (Peace be upon Him) was one of the most magnificent prophets.
The angels called out to him while he was standing in prayer in the Private Room: ‘Allah gives you the good news of Yahya, who will come to confirm a Word from Allah, and will be a leader and a celibate, a Prophet and one of the righteous.’ Qur’an.Surah Ale ‘Imran 3:39.
He was born of a barren mother and an aged father. In the fagging part of life Prophet Zakariyya (peace be upon him) prayed to Allah (Glory be to Him) to bless him with a son who could prove to be a successful heir and preacher of the religion of Allah (Glory be to Him). “He said: My Lord! surely my bones are weakened and my head flares with hoariness, and, my Lord! I have never been unsuccessful in my prayer to Thee). And surely I fear my cousins after me, and my wife is barren, therefore grant me from Thyself an heir. Who should inherit me and inherit from the children of Yaqoub, and make him, my Lord, one in whom Thou art well pleased”Qur’an.Surah Maryam 19:4-6.
His prayer was promptly granted. The Qur'an says: "0' Zakariya! Lo! We bring you a glad tidings of a son whose name is Yahya. We have given the same name to none before him.'' Qur’an.Surah Maryam 19: 7.
The Prophet Zakariya asked out of curiosity, “He said: O my Lord! when shall I have a son, and my wife is barren, and I myself have reached indeed the extreme degree of old age? He(angel) said: So shall it be, your Lord says: It is easy to Me, and indeed I created you before, when you were nothing. He said: My Lord! give me a sign. He(angel) said: Your sign is that you will not be able to speak to the people three nights while in sound health. Qur’an.Surah Maryam 19:8-10.
Yahya (Peace be upon Him) was born a stranger to the world of children who used to amuse themselves, as he was serious all the time. Most children took delight in torturing animals whereas, he was merciful to them. He fed the animals from his food until there was nothing left for him, and he just ate fruit or leaves of trees. Yahya (peace be upon Him) loved reading since childhood. When he grew up, Allah (Glory be to Him) the Exalted called upon him:
"O Yahya! Hold fast to the Scripture (The Torah)." And We gave him wisdom while yet a child. And compassion from Our presence and punity, and he was devout. And dutiful towards his parents. And he was not arrogant, rebellious. Peace on him the day he was born and the day he dies and the day he shall be raised alive.'' Qur’an.Surah Maryam 19: 12-15.
Allah (Glory be to Him) guided him to read the Book of Jurisprudence closely; thus, he became the wisest and most knowledgeable man of that time. Therefore, Allah (Glory be to Him) endowed him with the faculties of passing judgments on people's affairs, interpreting the secrets of religion, guiding people to the right path, and warning them against the wrong one. Yahya (Peace be upon Him) reached maturity. His compassion for his parents, as well as for all people and all creatures, increased greatly. He called people to repent their sins. There are quite a number of traditions told about Yahya (peace be upon Him). Ibn Asaker (May Allah Have Mercy on Him) related that one time his parents were looking for him and found him at the Jordan River. When they met him, they wept sorely, seeing his great devotion to Allah (Glory be to Him), Great and Majestic. Ibn Wahb (May Allah Have Mercy on Him) said that, according to Malik, grass was the food of Yahya Ibn Zakariyah (Peace be upon Him), and he wept sorely in fear of Allah (Glory be to Him).
He found comfort in the open and never cared about food. He ate leaves, herbs, and sometimes locusts. He slept anywhere in the mountains or in holes in the ground. He sometimes would find a lion or a bear as he entered a cave, but being deeply absorbed in praising Allah (Glory be to Him), he never heeded them. The beasts easily recognized Yahya (peace be upon Him) as the prophet who cared for all the creatures, so they would leave the cave, bowing their heads. Yahya (peace be upon Him) sometimes fed those beasts, out of mercy, from his food and was satisfied with prayers as food for his soul. He would spend the night crying and praising Allah (Glory be to Him) for His blessings. When Yahya (peace be upon Him) called people to worship Allah (Glory be to Him), he made them cry out of love and submission, arresting their hearts with the truthfulness of his words. A conflict took place between Yahya (peace be upon Him) and the authorities at that time. A tyrant king, Herod Antipas, the ruler of Palestine, was in love with Salome, his brother's daughter. He was planning to marry his beautiful niece. The marriage was encouraged by her mother and by some of the learned men of Zion, either out of fear or to gain favor with the ruler. On hearing the ruler's plan, Yahya (peace be upon Him) pronounced that such a marriage would be incestuous. He would not approve it under any circumstance, as it was against the Law of the Torah.
Yahya's (peace be upon Him) pronouncement spread like wildfire. Salome was angry, for it was her ambition to rule the kingdom with her uncle. She plotted to achieve her aim. Dressing attractively, she sang and danced before her uncle. Her arousing Herod's lust. Embracing her, he offered to fulfill whatever she desired. At once she told him: "I would love to have the head of Yahya (Peace be upon Him), because he has defiled your honor and mine throughout the land. If you grant me this wish, I shall be very happy and will offer myself to you." Bewitched by her charm, he submitted to her monstrous request. Yahya (peace be upon Him) was executed and his head was brought to Salome. The cruel woman gloated with delight. But the death of Allah’s beloved prophet was avenged. Not only she, but all the children of Israel were severely punished by invading armies which destroyed their kingdom.
Narrated Malik bin Sasaa ®: That the Prophet talked to them about the night of his Ascension to the Heavens. He said, “(Then Gabriel took me) and ascended up till he reached the second heaven where he asked for the gate to be opened, but it was asked, ‘Who is it?’ Gabriel replied, ‘I am Gabriel.’ It was asked, ‘Who is accompanying you?’ He replied, ‘Muhammad.’ It was asked, ‘Has he been called?’ He said, ‘Yes.’ When we reached over the second heaven, I saw Yahya (i.e. John) and Jesus who were cousins. Gabriel said, ‘These are John (Yahya) and Jesus, so greet them.’ I greeted them and they returned the greeting saying, ‘Welcome, O Pious Brother and Pious Prophet!;‘ ” Sahih Al Bukhari Vol 5:227.
Stories of the Prophets by Ibn Kathir