by 1707, in metaphysics, "the self; that which feels, acts, or thinks," from Latin ego "I" (cognate with Old English ic; see I); its use is implied in egoity.
They that have pleaded against Propriety, and would have all things common in this World, have forgotten that there is a Propriety, in our present Egoity, and Natural Constitution, which rendereth some accidental Propriety necessary to us (etc.) ["The Practical Works of the Late Reverend and Pious Mr. Richard Baxter," London, 1707]
Psychoanalytic (Freudian) sense is from 1894; sense of "conceit" is 1891. Ego-trip first recorded 1969, from trip (n.). Related: egoical.
In the book of Egoism it is written, Possession without obligation to the object possessed approaches felicity. [George Meredith, "The Egoist," 1879]