Appropriately enough, the self-centered word self, when combined with others, sometimes gets special treatment.
Self, as a prefix, is attached by a hyphen to other words in several parts of speech. The combination can be a noun (self-control), an adjective (self-absorbed), a verb (self-medicate), or an adverb (self-importantly). It can also refer literally to a person (self-regard) or can figuratively apply to an inanimate object (self-contained). However it is used, though, it is always, with one aberrant exception I’ll refer to below, hyphenated.
In adjectival usage, although most phrasal adjectives are hyphenated before a noun but left open after (“The well-known artist drew a big crowd,” but “That artist is well known”), compounds that include the prefix self are hyphenated in both positions: “The self-possessed girl was confident but not conceited,” and “That girl is remarkably self-possessed.”
This rule applies also to all, another prefix used in phrasal adjectives: “The all-inclusive policy was more successful”; “The policy is all-inclusive.” Ex, although not employed in phrasal adjectives, is another prefix always hyphenated to the word that follows: “That’s her ex-boyfriend.”
The exception for the prefix self I referred to above is this: Though self-conscious and self-consciously are so constructed, the antonym presents a problem: Words are often strung together into phrases with hyphens (“She had an annoying devil-may-care attitude”), but this strategy is considered inappropriate when prefixes are concerned. Un-self-consciously looks awkward.
Unfortunately, the preferred alternative, unselfconsciously, is equally repugnant. The solution? Instead of writing “His unselfconsciousness was refreshing,” write “His lack of self-consciousness was refreshing.” As an alternative to the adverbial form in, for example, “They played together unselfconsciously,” try “They played together with no self-conscious behavior.”
In all other usage, though, words in which self or its plural form appears — when self is followed by a suffix (selfish, selfless) or when it is combined with a pronoun (yourself, myself, itself, ourselves, themselves, and so on) — are not hyphenated.