Hello ShadowNinjaHamster,
Now, I'm not an expert, but maybe you could put on a glove and place your hand, palm up, on the bedding in your hamster's cage. If he bites you, don't react. He should learn that biting doesn't do anything and stop, losing interest. When he stops, give him a treat and then leave. Do this daily and keep the interactions short, until he doesn't care to bite at all. This should teach that you aren't going to hurt him. That's what I would do, but again, I'm a beginner myself.
Sometimes hamsters can have cage aggression. When hamsters don't have a big enough cage, they can get aggressive over the little space they have, just like people.

But then, if his cage meets the minimum, this is unlikely as far as I know. Even still, if can, try upgrading.