Old English modignes "pride, passion, anger;" see moody + -ness. Meaning "condition of being subject to gloomy spells, peevishness, sullenness" is from 1858.
Entries linking to moodiness
moody adj.
"angry, quarrelsome," 12c., from Old English modig "brave, proud, high-spirited, impetuous, arrogant," from Proto-Germanic *modago- (source also of Old Saxon modag, Dutch moedig, German mutig, Old Norse moðugr); see mood (n.1) + -y (2). Meaning "subject to or indulging in gloomy spells, out of humor, sullen" is recorded by 1590s (via the Middle English sense of "angry"). Related: Moodily.
-ness
word-forming element denoting action, quality, or state, attached to an adjective or past participle to form an abstract noun, from Old English -nes(s), from Proto-Germanic *in-assu- (cognates: Old Saxon -nissi, Middle Dutch -nisse, Dutch -nis, Old High German -nissa, German -nis, Gothic -inassus), from *-in-, originally belonging to the noun stem, + *-assu-, abstract noun suffix, probably from the same root as Latin -tudo (see -tude).