Recently the European Union’s Court of Justice ruled that gamers are within full rights to resell their games.
What’s more, publishers can’t do anything about it, and that applies to games downloaded from Steam and Origin as well.
The ruling states:
Where the copyright holder makes available to his customer a copy – tangible or intangible – and at the same time concludes, in return form payment of a fee, a licence agreement granting the customer the right to use that copy for an unlimited period, that rightholder sells the copy to the customer and thus exhausts his exclusive distribution right. Such a transaction involves a transfer of the right of ownership of the copy. Therefore, even if the licence prohibits a further transfer, the rightholder can no longer oppose the resale of that copy
There is a catch though: When reselling your game, you’re forfeit your right over it. Infringing on that – by continuing to use the license or not providing access to the new owner – will get you in trouble.