Ego is the movement of the mind toward objects of perception in the form of grasping, and away from objects in the form of aversion. This fundamentally is all the ego is. This movement of grasping and aversion gives rise to a sense of a separate 'me,' and in turn the sense of 'me' strengthens itself this way.
Adyashanti