The pronunciation shifted from /mu/ to just nasal /m/ and then to the generalized nasal /ɴ/ by the mid-Heian period (794–1185), leading some writers to use ん(n) instead to write this suffix. The kana ん(n) itself evolved out of a hentaigana (alternative kana form) for む(mu) based on the cursive for kanji 无(mu). In Classical Japanese texts, the practice now is to pronounce final む(-mu) as ん(-n) instead.
As a separate phonological shift, /mu/ retained the vowel but lost the consonant, becoming a nasalized /ũ/ and then plain /u/. This then often fused with the preceding vowel, ultimately leading to the development of the modern volitional / suppositional /oː/ ending in modern Japanese. See よう#Japanese:_suffix for more detail.
Variously described as suppositional ("seems like"), volitional ("I will"), or hortative ("let's). Ultimately, all of these senses arise from an apparent base meaning of "seem, appear, look like". May be cognate with 目(me, “eye”), 見る(miru, “to see; to look at”), びる(-biru, “to look like, to seem like, to behave like”).