True, the dos loader sets up ds (for a .com file only!), so that's not the problem. And "mov dx, msg" *does* put the offset in dx, not "msg itself" (I assume you mean "contents" - the letters "H" and "e" - Nasm would want "mov dx, [msg]" for that!), so that isn't the problem, either.
The code, as given, looks perfectly allright - for a dos .com file. So the problem would seem to be that "my comp" doesn't like dos .com files... for some reason... Trying it in Linux would result in "can't execute binary file", rather than "illegal operation"... Windows, while it won't run 16-bit code directly, should recognize a .com file and run it as a vm86 task... Damned if I know what the problem is!
If the original poster is still around (unlikely), and hasn't long since solved the problem (even less likely), what command-line did you give Nasm to assemble this, what OS are you running, and exactly what does the error-message say?
Best,
Frank