Raja Janak would frequently hold shastrarths in his court where scholars from all over the world would be invited. He had an undying quest for knowledge, the more he got to know, the greater became his ego, but the one experience that he desired did not come his way…he met countless scholars, but he could not find a Guru.
One day Muni Ashtavakra happened to pass through the kingdom of Mithila. When he heard about shastrarths at Janak’s court, Ashtavakra, born with eight different deformities of the body due to the curse of his father, headed for the King’s palace. As he entered the royal court all the great scholars and other courtiers burst into laughter on seeing his deformed body. Ashtavakra looked around the assembly and said,
“I thought I was in the company of wise men, but now I realize that you are all cobblers since you have only recognized my deformed body and not my Self. A cobbler evaluates quality on the basis of skin. I cannot believe that I am in the company of astute scholars who cannot understand that although the river may be crooked, the water never is…”
On hearing these words the king was embarrassed and asked, “Will you give me the gyan of Brahma in the wink of an eye?”
“Indeed I will give you that. But for that you must give me all that you have.”
In the presence of all the pundits, King Janak promptly and ungrudgingly agreed. Ashtavakra then asked Janak to leave his throne and sit in the crowd since the throne belonged to him no more. Janak did as was told. Next the Muni asked Janak to cease all the planning that was happening in Janak’s head for the kingdom was no more his own. He told Janak to drop the awareness of body, since even his body was no more his. Next he asked Janak to leave all thoughts, for even the mind, ego and thoughts were not his anymore. In the sanidhya of Guru, Janak emptied it all…and as he did so, he got the experience he desired.
He bowed in front of the great rishi, who in the wink of an eye gave him the gyan of Brahma and beyond…gurur brahma, gurur vishnu, gurur devo maheshwara, gurur sakshatah para brahma…The Guru alone can burn the desires and ego of the shishya and give him the gyan of what lies beyond.
Ashtavakra returned all that he took from Raja Janak and asked him to take care of them as a custodian mere, for they no longer belonged to him…
Gyan comes to those in a moment who have the courage to give up everything in that moment, as is asked by the Guru.
Source- http://theinnerworld.in/spirituality/from-the-puranas/raja-janak-muni-ashtavakra/
Raja Janak after realisation says:
I am now spotless and at peace–
Awareness beyond Consciousness.
All this time
I have been duped by illusion.
As waves, foam and bubbles
are not different from water,
so the universe emanating from Self
is not different from Self
As sweetness
pervades sugarcane juice,
I am the essence of creation.
Not seeing Self, the world is materialized.
Seeing Self, the world is vanished.
A rope is not a snake,
but can appear to be.
As a pot returns to clay,
a wave to water,
a bracelet to gold,
so will the universe return to Me.
I am wonderful indeed–
beyond adoration.
Even with a body I am One.
I neither come nor go.
I am everywhere at once
I am wonderful indeed–
beyond adoration.
I am astounded at my powers.
The universe appears within me
but I do not touch it.
I am wonderful indeed–
beyond adoration.
I am everything thought or spoken,
and have nothing.
Looking at One and seeing many
is the cause of all misery.
The only cure is to realize
what is seen is not there.
I am One—aware, blissful, immaculate.
I am neither free nor bound.
The illusion of such things
has fallen into disbelief.
Though I contain creation,
it has no substance.
The body exists only in imagination,
as do heaven and hell,
bondage, freedom, fear.
Are these my concern?
I, who am pure Awareness?
I am not the body.
I do not have a body.
I am Awareness, not a person.
My thirst for life bound me
to a seeming of life.
And how wonderful it is!
In the limitless ocean of Myself,
waves of beings
arise, collide, play for a time,
then disappear–as is their nature.
Tests of Self realisation Ashtavakra Says:
Having realized yourself as One,
being serene and indestructible,
why do you desire wealth?
Just as imagining silver in mother-of-pearl,
causes greed to arise,
so does ignorance of Self
cause desire for illusion.
Having realized yourself as That
in which the waves of the world rise and fall,
why do you run around in turmoil?
Having realized yourself as pure Awareness,
as beautiful beyond description,
how can you remain a slave to lust?
It is strange
that in a sage who has realized
Self in All and All in Self
this sense of ownership should continue.
Strange that one abiding in the Absolute,
intent on freedom,
should be vulnerable to lust
and weakened by amorous pastimes.
Strange that one who is unattached
to the things of this world and the next,
who can discriminate between the transient and the timeless,
who yearns for freedom,
should yet fear the dissolution of the body.
A great soul
witnesses his body’s actions
as if they were another’s.
How can praise or blame disturb him?
Translation of Excerpts of Ashtavakra Geeta