adverb; from 何気ない (nanikinai, adjective meaning 'casual, unintentional') + adverbial suffix -く
Analysis. 何 (nani, 'what') + 気 (ki, 'spirit, mood, feeling') + ない (nai, negative) + く (adverbial ending): literally 'without spirit/consciousness of what' → 'without particular intention'
Etymology. The core 気 (ki, spirit/mood) is a native Japanese word for the vital life force, related to Chinese 氣. The negation ない follows standard patterns. The sense drifted from 'without awareness' to 'casually doing something'.
Dictionary entry by Claude.
Lite mode — plain HTML for e-readers and old browsers. Full version