1590s, "a wandering, act of straying," from Latin aberrationem (nominative aberratio) "a wandering," noun of action from past-participle stem of aberrare "to wander out of the way, lose the way, go astray," literally and figuratively, from ab "off, away from" (see ab-) + errare "to wander, stray, roam, rove" (see err). Meaning "deviation from the normal type" is attested by 1735.
Words for "error" in most Indo-European languages originally meant "wander, go astray" (for example Greek plane in the New Testament, Old Norse villa, Lithuanian klaida, Sanskrit bhrama-), but Irish has dearmad "error," from dermat "a forgetting."
[The egomaniac, as opposed to the megalomaniac,] does not regard it as necessary to dream of himself as occupying some invented social position. He does not require the world or its appreciation to justify in his own eyes himself as the sole object of his own interest. He does not see the world at all. Other people simply do not exist for him. The whole 'non-Ego' appears in his consciousness merely as a vague shadow or a thin cloud. The idea does not even occur to him that he is something out of the common, that he is superior to other people, and for this reason either admired or hated ; he is alone in the world ; more than that, he alone is the world and everything else, men, animals, things are unimportant accessories, not worth thinking about. [Max Nordau, "Degeneration," English translation, 1895]
Nordau's book was much-read, debated, and cited at the time and the word was associated with him (e.g. The Agora, July 1895).
Walker's use aside, its infrequent print appearance before 1895 seems to have been largely in the side of medicine that dealt with psychological matters:
The most frequent, yet the most extraordinary of these perversions of temper, are seen in young females. It is a species of aberration of the intellect, but short of insanity, real enough, but exaggerated, fictitious, factitious, and real at the same time. It frequently has its origin in dyspepsia, hysteria, or other malady, and in emotion of various kinds, such as disappointment, vexation, &c. Its object is frequently to excite and to maintain a state of active sympathy and attention, for which there, is as it were, a perpetual, morbid, and jealous thirst. It was rather aptly designated, by the clever relative of one patient, an ego-mania. [Marshall Hall, M.D., "Practical Observations and Suggestions in Medicine," London, 1845]