This great teaching occurs in the Brihadaranyaka Upanishad.
The verse states “This [self] was indeed Brahman in the beginning. It knew itself only as ‘I am Brahman’. It became all. Whoever realized this, they also became That [Brahman]. And to this day, whoever in a like manner knows the self as ‘I am Brahman’, becomes all this universe”.
This teaching is known as the anubhava vakya (statement of experience), since it is the declaration that comes out of the direct realization of reality. Even in the previous teaching, a separate individual Self and a universal Self have been presumed. Upon meditation, the individual Self ultimately reveals its identity with the universal Self. But this statement is being made by the realized being who has already become the one Self.This teaching is being delivered from the pinnacle of realization. It is as if the Universal Consciousness itself is delivering this teaching! When such a being declares, Aham Brahmasmi, we must not misunderstand it as a statement made by the individual ego. Only one whose very identity has been washed away in the flood of realization can declare that he is All!
It is dangerous to meditate on this statement when the sense of individuality is still alive. While retaining our idea of ourselves as limited individuals, it will be impossible for us to even hold this statement in our mind! We naturally feel, How can I, this individual, be Brahman? If we persist, the individual ego will start subtly believing that it is Brahman! We must be careful not to fall into these traps of the mind. Strictly speaking, Aham Brahmasmi cannot serve as a meditation technique, except for the rare seeker who is highly mature, intelligent and refined.
It can be understood only as a statement of the Ultimate Truth, made by one who is living in
that experience.