at least for a moment, something was more important to him than fear of death, so he sinned.
not that fear of death is the only motivation, of course - but in the moment when he took the fruit and ate it, knowing the consequences, he certainly wasn't afraid to die.
maybe he was more afraid of...