A simple example would be 天. It was pronounced something like /tʰen/ or /tʰien/ in Middle Chinese and would've been borrowed into Old Japanese most likely with the pronunciation /tʲeN/ (compare Vietnamese thiên
and Korean cheon
), which eventually became /teN/ by Middle Japanese.
Internally, Japanese itself saw many nasal-vowel syllables (typically with a high vowel) reduce to a moraic nasal by either Early Middle Japanese or Late Middle Japanese. A classical example is how /jomi-/ "read" + /-te/ became /joNde/ 読んで. There are also limited examples of /N/ originating from voiced labial consonants, e.g. /tobi-/ "fly" + /-te/ became /toNde/ 飛んで.
Still an active process dialectally
The process of nasal-vowel syllable reduction is still active in some dialects. For example, in the Kagoshima dialect
, it's so pervasive that nearly all /ni/, /nu/, /mi/ and /mu/ syllables have become /N/. For example, /kamu/ "to bite" and /kami/ "hair" are both /kaN/ in this dialect.
And just in case you're curious, all Ryukyuan varieties also have /N/ both in borrowed Chinese words and in native words and verbs, so it's certain that the sound change started before the Ryukyuan varieties split off from mainland Japanese.