"delusions of greatness; a form of insanity in which the subjects imagine themselves to be great, exalted, or powerful personages," 1866, from French mégalomanie; see megalo- "great, exaggerated" + mania "madness."
late 14c., "mental derangement characterized by excitement and delusion," from Late Latin mania "insanity, madness," from Greek mania "madness, frenzy; enthusiasm, inspired frenzy; mad passion, fury," related to mainesthai "to rage, go mad," mantis "seer," menos "passion, spirit," all of uncertain origin, perhaps from PIE *mnyo-, suffixed form of root *men- (1) "to think," with derivatives referring to qualities and states of mind or thought.
Mania is manifested by psychic elevation, increased motor activity, rapid speech and the quick flight of ideas. [Scientific American, September 1973]
Sense of "fad, craze, enthusiasm resembling mania, eager or uncontrollable desire" is by 1680s, from French manie in this sense. Sometimes nativized in Middle English as manye. Used since 1500s as the second element in compounds expressing particular types of madness (such as nymphomania, 1775; kleptomania, 1830; megalomania, 1890), originally in Medical Latin, in imitation of Greek, which had a few such compounds, mostly post-classical: gynaikomania (women), hippomania (horses), etc.
1882 (n.), "one suffering from megalomania;" 1883 (adj.) "afflicted with megalomania," from megalomania (q.v.).
The megalomaniac differs from the narcissist by the fact that he wishes to be powerful rather than charming, and seeks to be feared rather than loved. To this type belong many lunatics and most of the great men of history. [Bertrand Russell, "The Conquest of Happiness"]
<a href="https://www.etymonline.com/word/megalomania">Etymology of megalomania by etymonline</a>
Harper, D. (n.d.). Etymology of megalomania. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/megalomania