Nämen comes from the words nej and men which literally mean 'no' and 'but'.
It is used, often at the start of a sentence, to express mild surprise in a positive, neutral or negative sense: 'Nämen, what a cute dog!'). Or draw out the second syllable for effect: nämeeeeeeeen if it's a really cute dog.
It's a bit like going 'oh' in English, or 'gosh', or 'well, well, well!'
Nämen can also stand on its own, if said with right emphasis. If you for example run into a friend you haven't seen in a while, you can go nämen! when you spot them. With just one little word you can say 'Fancy seeing you here! Long time no see! I've missed you, old pal'. Swedish is a wonderfully efficient language.
It can also be used as one of those words at the start of a sentence before you get to what you actually want to say (much like 'well' in English). 'Nämen, should we start thinking of going home?'
Nämen, vad duktig du är
Wow, you're so good