My hamster does that but that's only because he's blind/deaf and doesn't know his surroundings besides the scent. It confuses him really bad when we take him in and out of his cage. I guess try to make sure he isn't blind or deaf? Maybe he's just scared.