Triyamabakeswara Jyotirlinga is related to origin of River Godavari, Rishi Gautama and Ganga River. Shiva Linga here has faces of 3 Gods of Hindu Trinity Brahma, Vishnu and Maheswara and thus Shiva linga here is called Trimbakeshwara Jyotirlinga.
Chapters 24, 25, 26 and 27 of Koti Rudra Samhita of Shiva Mahapurana describes the story of Triyambakeswara Jyotirlinga in detail.
Once the region near Brahmagiri Hills of Sahyadri Mountains (Western Ghats) got inflicted with drought. Gautama Rishi with his wife Ahalya and disciples lived there. For benevolence of region, Gautama Maharshi did hard tapasya of Pranayama for 10,000 years. Varunadeva granted him the boon and asked him to dug a pit and divine water emerged out from pit and region prospered with various crops.
There were also other sages who lived there in that region. Once a quarrel happened between disciples of Gautama and wives of other sages. Disciples of Gautama were made to wait. Disciples of Gautama enraged and complained to Ahalya. Ahalya somehow managed to get water but wives of those sages enraged and rebuked her. The wives incited their husbands by saying concocted stories.
The Sages to retaliate prayed sincerely to Lord Ganesha. Lord Ganesha appeared before them and sages requested Ganesha to send Gautama out of hermitage. Ganesha initially was reluctant but finally obliged saying to sages that they must accept the consequences their action.
Ganesha went to the paddy fields of Gautama disguised as Cow and started grazing those paddy fields. Gautama Muni drove the Cow with straw and Cow died instantly by mere touch and other sages censured him of Go-Hatya.
कम्पमाना च सा गत्वा तत्र तद्वरयोगतः।
मुनिसत्तमाः।। ३० ।।
O excellent sages, staggering and faltering, the cow, because of the
boon grazed fields of barley and paddy.
एतस्मिन्नन्तरे दैवाद्गौतमस्तत्र चागतः।
दयालुस्तृणस्तम्बैर्वारयामास तां तदा।। ३१॥
In the meantime, the merciful Gautama also arrived there as a matter
of chance. He drove out the cow with the use of Straw.
तृणस्तम्बेन सा स्पृष्टा पपात पृथिवीतले।
मृता च तत्क्षणादेवतदृषेः
पश्यतस्तदा।। ३२ ।।
With the mere touch of the straw, the cow fell
on earth and died in full view of the sage.
Those wicked sages ordered Gautama to leave that place. Sage Gautama moved to new place which was at distance of Krosa. Gautama Muni feeling repented requested other sages to prescribe a method to get rid of sin of killing the cow. The sages suggested some methods and asked to choose one method. gautama Muni chose to Worship Parthiva Linga.
पार्थिवानां तथा पूजां गिरेः प्रक्रमणं तथा।
Saying that, “As per your command I shall resort to the adoration of
Parthiva linga and shall go round the mountain.”
इत्युक्त्वा सर्षिवर्यश्च कृत्वा प्रक्रमणं गिरेः।
Thus speaking the excellent sage, after
going round the mountain, made a Pärthivalinga and adored it.
For his tapasya, Lord Shiva appeared with His Ganas and asked for a boon. Gautama Muni asked to relieve from sin of killing cow. Lord Shiva enlightened him saying that it was conspiracy hatched by wicked Brahmanas.
धन्योऽसि कृतकृत्योऽसि निष्पापोऽसि सदा मुने!।
एतैर्दुष्टैः किल त्वं च छलितोऽसि खलात्मभिः॥ ६॥
Śiva said, “O Sage, you are quite graceful, successful, unblemished
and sinless. The wicked sages have cheated you, they are sinful,
wicked and killers.
Gautama Muni considered wicked Brahmanas plan as boon as he got the opportunity to see Lord Shiva. Lord Shiva asked him another boon and Gautama Muni asked Shiva to give Ganga for benevolence of world.
ततस्तु शङ्करो देवः पृथिव्याश्च दिवश्च सः।
सारं चैव समुद्धृत्य
रक्षितं पूर्वमेव तत्॥२१॥
विवाहे ब्रह्मणा दत्तमवशिष्ट च किञ्चन।
तत्तस्मै दत्तवाञ्शम्भुर्मुनये भक्तवत्सलः।। २२ ।।
Then Siva, took out the essence of the heaven and earth, which had
been extracted earlier, and was given by Brahmā to Śiva in the
marriage of the latter, besides the remaining water of the Gangă, was
given away to Gautama by lord Śiva, who is well disposed towards his
गङ्गाजलं तदा तत्र स्त्रीरूपमभवत्परम्।
स्तुतिं कृत्वा नतिं व्यधात्॥ २३॥
The water of the Gangă, then took to the form of a damsel. The sage
Gautama, then eulogising her, bowed in reverence to her.
धन्यासि कृतकृत्यासि पावितं भुवनं त्वया।
मां च पावय
गङ्गे त्वं पतन्तं निरये ध्रुवम्॥ २४॥
Gautama said, “You are graceful, blessed and successful. You have
purified the earth. O Gangă, you purify me since I am falling in the
Ganga then said to sage that after purifying him, she would go to her abode. Then Shiva ordered Ganga to stay there till end of 28th Kaliyuga of Vaivasra Manvantara.
Then Ganga requested Mahadeva to stay there with His consort and Ganas. Devas eulogized them and said they would visit that place when Jupiter comes to Leo.
There Ganga and Shiva stayed there as Gautami (Godavari) and Triyambakeswara.
सिंहराशौ यदा स्याद्वै गुरुः सर्वसुहृत्तमः।
च सर्वे त्वागमिष्यामो न संशयः।।४३।।
All the gods said, “When the Jupiter, the most friendly to all, comes
to the zodiac of Leo, then all of us will arrive here. There is no
doubt about it.
सा गङ्गा गौतमी नाम्ना लिङ्ग व्यम्बकमीरितम्।
महापातकनाशनम्॥ ५० ॥
Then Gangā came to be known by the name of Gautami, while the
Šivalinga WaS known by the name of Tryambakesvara. Both of them wash
out the grave sins.
तद्दिनं हि समारभ्य सिंहस्थे च वृहस्पतौ।
क्षेत्राणि दैवतानि च।। ५१।।
Since that date, at the time of Jupiter’s entry into the zodiac Leo,
all the tirthas, kşetras, and the gods visit the place.