It derives from being “owned” in an online FPS game, like DOOM or QUAKE.
If someone frags you, esp. quickly, they consider you “owned”. If they type “owned” in the text message
box too quickly (because they’re too busy shooting stuff), they
hit the “p” key instead of the “o” key, because those keys are spatially local, and they end up typing “pwned”. Eventually, “pwned” became more
popular to type than “owned”.