Tryambakeshvar, that is, Shiva came at this place because of a curse from Brahmadeva. It happened like this. Brahmadeva and Vishnu were once discussing things. In the course of these talks the name of Shiva occurred. Now, although Brahma, Vishnu and Shiva belonged to the all-powerful trinity, none could claim either to have known or to have understood the true nature of the others. Thus Brahman told Vishnu that although he was responsible for all creation, he had not understood fully what Shiva was. Vishnu on his part was equally frank and confessed that nor had he under stood their colleague. This, both agreed, was not a very happy state of affairs.
And therefore, it was decided to go and search for the head and feet- the adi and anta—of Shiva. Both started in opposite directions, They were aware that the task they had undertaken was not very easy, and was likely to consume a great deal of time and energy. Years passed by but neither was able to go any where near the objective. Brahmadeva lost his patience and decided to play a trick upon Vishnu. He went back and reported that he had at last discovered Shiva’s bead. He cited a cow and a Ketaki tree as witnesses.