This is a circular argument. Whether a sentient NPC is, in fact, still fiction is the entire question.
The story in the game is fictional, but at some point the medium bottoms out on something with physical reality. The risk is of the medium of the story having rights. The nearest real-world analogue would be if you were trying to put on a realistic Hamlet, so you get some clone people to play the people who die and then you actually kill them. Is that murder? That they died in the course of producing entertainment.
For the time being I think there will always be a clear divide between biological life (as we know it currently), and "virtual" or machine life, as we create it - I think these ethical questions will come in to play when the two become intermixed enough to not be distinguishable one way or another, which I think is still a far way off.
The reason I say the above is just based on our history as a species, and our current treatment of biological life - I think "virtual" life will likely be treated as 2nd class compared to biological life, at least at the beginning.
I am seeing it completely opposite. Assuming they gain a self awareness, they would know nothing about server they are living on. They wouldn't know a thing about our world or about the player. They'd think that their world is the one and, if any, will see other servers or our world as some sort of "heaven" or another dimension. Would you know if our universe would run on some server?
That is, unless someone told them that they have been created for a sake of entertainment and will die as soon as player is bored enough to uninstall the game. Which would probably make them behave completely different than expected, since they would know they aren't "real". Not to mention that it would simply be a cruel thing to do, considering above mentioned assumption.
Moral quandary solved!
I mean, I could certainly imagine myself having a good time pretending to be the bad guys who fight the player character.
Those in the dream might have arguably better AI than any video game character could hope to have and be as realistic as possible. But they're also not real. They don't matter and simply cannot matter.
Same goes for virtual acts towards real people's avatars. If they're within the rules of the game and what the creators of it intended, then they're not against the law. Because you haven't really done anything to them.
Otherwise you may as well start saying it's wrong to kill players in a MMORPG setting or what not.
Then again, I'm also someone who thinks fictional worlds should be treated as if they were completely seperate universes to the 'real' one in general. Murder, theft, assault, terrorism... right down to copyright infringement shouldn't be banned in a fictional world unless that world's setup explicitly sets laws against those things.
We have to keep fiction and reality seperate.