I'd pinch him back not hard but a little pinch wont hurt. Or tell him no in a stern voice and tap his hand. It's what I did with my nephew he would bite his siblings and us so hard it would cause us to bleed. After a few taps he understood that biting hurt and it's not ok to bite. Of course he threw his fits when my sister and I would tap his hand but we would set him down let him throw his fit and walk away.