Ich glaube es nicht!
But shouldn't we use the dative form here? "Ich glaube ihm nicht"
It depends on what you want to say. The sentences are correct, but they mean different things.
Ich glaube ihm nicht. = I don't believe him.
("ihm" is dative and refers to the person who told me something)
Ich glaube es nicht. = I don't believe it.
("es" is accusative and refers to the message that I learned (and don't believe)).
When we mean "I don't believe it", why we say "Ich glaube es nicht"? The dative form of "es" is "ihm". As I have learned "glauben" is a dative verb
Here is an example:
Ich glaube die Geschichte.
I believe that the story is true. / I believe the story's truth.
Ich glaube der Geschichte.
I believe that what the story tells is true. / I believe the story.
Ich glaube an die Geschichte.
I believe that the story's existence is true. / I believe in the story.
This may not seem a relevant difference in the example, but it gets clearer with persons.