The n in nickname once belonged to an.
Ekename combined an addition with a name. In speech, an ekename could be understood as a nekename: the same consonant acquired a new word boundary. Further spelling changes produced nickname. Its nick therefore has no separate original meaning here.
These are selected phrases, not an exhaustive sequence of spellings.
Source
Merriam-Webster: nicknameWord History and Kids Word Origin describe the phrase boundary change and subsequent modern spelling.