In the bestselling His Dark Materials books, author Philip Pullman depicted the church as a corrupt and murderous bureaucracy and God as senile, frail and impotent. And, despite condemnation by the Christian right, Pullman has now taken on the Gospels directly. In his new story, he writes that Jesus had a manipulative twin brother, Christ, who tempted him in the wilderness and betrayed him to the authorities.

Using the four Gospels as its source, The Good Man Jesus and the Scoundrel Christ, which will be published on Wednesday, has the naive young Mary giving birth to twins after a visit by a mysterious stranger claiming to be an angel.

The babies grow up into the physically robust, straight-talking, straightforward Jesus and the bookish, calculating, often morally tortured Christ.

At a climactic point in the story, Jesus condemns the idea of a church, saying it would cause the devil to "rub his hands with glee" and predicting that "from time to time, to distract the people from their miseries … the governors of this church will declare that such-and-such a nation or such-and-such a people is evil and ought to be destroyed … and they'll raise their standard over the smoking ruins of what was once a fair and prosperous land and declare that God's kingdom is so much the larger and more magnificent as a result".

"He is really speaking for me in that section," said Pullman. He added: "Of course I don't condemn speculative thinking, or organising people to help them do good, or setting up hospitals or giving hospitality to travelling strangers or educating people. But we have seen very recently how some aspects of all this can go wrong. People can abuse power.

"The greatest excuse in the world is that 'God told me to do it': hence the Crusades. Once you are appealing to an authority that can't be checked, you are doing something dangerous."

Pullman's forthright views on religion have earned him enemies. He has already received "a few dozen letters" protesting about the new book even before it has reached the bookshops, he said.

"They are anxious on my behalf," he added. "They don't want me to go to hell. It's kind of them to be concerned but I am going to ignore them."

In Pullman's work, Jesus is a charismatic, honest speaker, who believes that the kingdom of God is imminent. Christ, on the other hand, has an eye to posterity, to the need for an organised church and to the requirements of history. "He knows that human beings, being what they are, need structures, they fall into bureaucracy. He knew that the kingdom never was going to come," said Pullman.

In some ways the figure of Christ stands in for the idea of the author – a morally ambiguous character on the sidelines, who records events, and shapes and edits them into narratives. "It is a story about how stories become stories," said Pullman.

The book contains manipulated versions of familiar episodes from the Gospels, including the Wise and the Foolish Virgins. According to Pullman: "I think my version is much closer to what Jesus would have said. The version in the Gospels is so different from what he said usually."

The story is being published by Edinburgh-based Canongate as part of its Myths series, for which it has invited writers such as Ali Smith, Salley Vickers and Margaret Atwood to rework favourite legends. Having known the Gospels as a child, Pullman said that he had decided to "reacquaint myself with how they were. So I read them in the King James Bible, the New English Bible and the New Revised Standard Bible: and very curious documents they are too.

"They are not like novels, or fairytales, or history or biography. Jesus is a strange figure: a man whose family thought he was more than a man.

"I also read Acts and the Epistles and I was intrigued to see how much more Paul was occupied by Christ than by Jesus. I found this very interesting, and wanted to tell a story emphasising the separate qualities of Jesus and Christ, so I decided to make them into two characters."