I seem unable to acquire religious belief. I do not feel like mocking any form of religion; I do not, like one sucking a hollow tooth, nag at what many would call my deprivation. Though I respect friends who remain or have become religious, I do not envy them. I am gently moved by Christopher Smart's homage to his cat Jeoffry:

For I will consider my cat JeoffryFor he is the servant of the Living God, dulyAnd daily serving him.

I take serious note of Cardinal Newman's injunction on answerability: "We can believe what we choose. We are answerable for what we choose to believe." I cannot accept from him that, if we have no belief in immortality, not only love but every living force maintaining the life of the world would at once be dried up. My whole experience - of love, of self-sacrifice, of the sense of the comic - cries out to reject that conclusion. Wherever else it may come from, the sense of moral responsibility finds one source in the reality of love at least as much as that of cruelty.

Plato's image of the cave, at whose back wall we look, seeing shadows that we assume are real places and events, suggests our world is an illusion, which is what many of us sometimes feel without knowing how and, even less, why. The metaphor is empty unless it is proposing: "Turn around and face the real world." But what meaning, what truth, does that "real", "true" world have? Have we, if anyone, internally created it? If another, is that creator demonic or divine?

Before such bewilderment it would be foolish categorically and without qualification to declare myself an atheist. That is to declare something we cannot know: better to say I am agnostic. I do not feel courageous in assuming this position, though probably, to some of my believing friends, I seem rather pig-headed, stubborn, even sinning against the light. After all, many people cleverer than I find no difficulty in believing in the existence of God; if them, why not me? In literature, there are many more assertions of the need to believe than there are defences of doubt. Montaigne asserted: "Man is a being born to believe." Ralph Emerson laid down that the affirmations of the soul insist on belief; a universe quite different from mine.

The procession over the centuries is long, especially from those who came to belief after great turmoil. Mark believed but asked God to help his unbelief; Tertullian believed because it was impossible. Blake's condemnation was frightening: "The bat that flies at close of eve/Has left the brain that won't believe." Tennyson believed where he could not prove. Jung was defiant before any questioner: "I do not believe . . . I know." Some of these thoughts are beautiful, some tantalisingly paradoxical, some opaque; none help much. "The heart has its reasons, of which reason knows nothing"; a great many people recall like a charm one translation or another of that thought of Pascal's.

Of many much repeated urgings-on-the-way, one said to be used by Catholic priests with young converts or doubters is: there must be a First Cause and that First Cause must be by definition greater than ourselves in intelligence and understanding. The games that First Cause plays are sometimes so odd that one can still withhold belief. At this point, Dostoevsky's Ivan Karamazov comes to many minds: Ivan will not accept that the sufferings of children are necessary to pay for truth; even truth is not worth such a price.

That is not a rejection of God, but a doubt about His observed way with the world. Yet for Him to do otherwise, above all to intervene to prevent disasters or cruelties, would be to remove our free will, we are told. That seems right; but it exacts a high price and one often paid by those who can least afford it. Kant turned the thought the other way: how could such people be the children of God? "Out of the crooked timber of humanity no straight thing can ever be made."

The more one looks, the stranger it all seems. So we ricochet: "We are, I know not how, double in ourselves, so that what we believe we disbelieve, and cannot rid ourselves of what we condemn" (Montaigne). We feel bound by the commitments we make, but do not know why we are so bound; in logic, we know why only in a prudential, quid pro quo sense, though it feels more than that; and we continue to make commitments. We are, above all, haunted by the disparity between what is and what, again without knowing why, we feel might and even ought to be. "Man," wrote Montaigne, "is the only animal that laughs and weeps for he is the only animal that is struck by the difference between what things are and what might have been."

I am apparently one of those who seem to have no sense of the numinous, the existential, the transcendental, the awesome, the holy, the immanent. Whatever the dictionaries say, those words are all to me without attachable meanings in experience. I feel more than ever now, in the light of the findings of this century's astronomers, almost unbelievably small, but oddly and, once again, inextricably moral; or sometimes moralising.

"So have I heard/And do in part believe"; like Hamlet, I continue to doubt. Probably many more than readily admit it may at times wish to believe, to acknowledge what Walt Whitman called "the maker's rage to order". But with people like me it may be a lesser urge, more a rage or a tic to put the world into order, to tidy its awful disconnectednesses. We are not among those whom, in Modern Love, George Meredith observes as "hot for certainties [presumably existential or spiritual] in this our life".

I feel deeply for and respect Newman in "distress", when he surveyed this world and saw no reflection of its Creator. No arguments in proof of God's existence then enlightened him or took away his grief. People such as I appear to belong more to Conrad's world of "incertitudes": "My efforts seem unrelated to anything in Heaven and everything under Heaven is impalpable . . . every image floats vaguely in a sea of doubt." Again, God sitting up there in silence, "paring his fingernails". Then Pascal: "Denying, believing and doubting are to men what running is to horses." Pascal's wit, as much as the more solemn precepts of other believers, can bring an agnostic nearer to accepting Christian belief.

Some quotations beset agnostics just because we expect little. They may not be true or the whole truth, but they capture something of the truth as we apprehend it. Such as Thoreau's endlessly quoted: "The mass of men lead lives of quiet desperation." Even more, for me, Wordsworth's profundity on suffering as "permanent, obscure and dark" and sharing "the nature of infinity".

Then others come to the rescue or give some comfort; comfort is sometimes needed, emptiness is no consolation. Chekhov: "Man is what he believes", which can be read either way, but puts the responsibility where it should be, as so often with Chekhov; the pattern of our beliefs composes our sense of self, even for agnostics. And the non-believer E M Forster, quietly commenting that we would do well to behave as if we were immortal and society eternal. I see no logical reason why we should so behave, but am drawn to the moral decency of the idea. That way, "we will keep more airholes open for the human spirit at its best"; I think I can recognise that. Strangely uplifting, then; a sort of blank cheque drawn on a bank we are not sure exists, but occasionally feel it might, and perhaps ought.

Nowadays we, the agnostics, count among those we most admire George Eliot; standing in the Fellows' Garden at Trinity College, Cambridge, observing how inconceivable is the idea of God, how unbelievable that of immortality, but how peremptory and absolute that of duty.

It is not difficult even for an agnostic to agree with Hannah Arendt: "The pillars of the best-known truths today lie shattered; we need neither criticism nor wise men to shake them any more." She speaks of the pillars of truth being shattered, not of belief being lost. But she may well have implied and assumed that truths founded in religion must be the basis of morality. Bertrand Russell plainly avoided words to do with religious conviction and ended with a sort of undeniable, assertive, but abstract and pokerwork-sounding motto: "Without civic morality communities perish; without personal morality their survival has no value."

The two - belief and morals - cannot easily be separated. Most moralities professed or neglected by Europeans have been founded on Judaeo-Christian belief. I do not know where the strength of my own sense of moral duty (not always lived up to) comes from; perhaps from a little of the same stance before life as George Eliot so much more impressively bore; probably, less loftily, from Primitive Methodism as it was mediated by precept at Sunday school, and at home by an upright, village Church of England grandmother. I would not like to call myself "driven". But those influences do drive.

A range of moral positions may remain with a great many of us after belief has gone. In provincial America, church- and chapel-going are still common, and what are, in most people, Christian ethics are still invoked as bases for conduct. Perhaps conventionally invoked more than practised? In such places, the pillars of the best-known truths may appear not to be "shattered" - but may by now be plastic substitutes and hollow.

Middle America can show this condition more extensively than any other "developed" society, but it affects much of Europe, too. One then wants to ask: how far down in most people do these beliefs go? Are they really still "beliefs", or even solid ethics? Or are they incantations without live connections; habitual conditionings only superficially followed in action and rarely practised under pressure?

So, my background leaves me with a sense of "right" conduct, of something to be kept up, perhaps also something to be accounted for - to someone. A sense of falling off or away, and so at times of guilt. Very individual and Protestant, as befits one of Luther's foot soldiers. Or is it more deep-seated in my nature than that? It sits also with biting every coin proffered by any collective congregation, and with a deeply rooted suspicion of the self-righteousness that can go with that.

The idea of women - church- or chapel-goers one and all, I would bet - handing out white feathers during the first world war to men in civvies (whose conditions they could not know) is one of this century's most blatantly horrible British instances of that self- righteousness.

Moral convictions of one's own, if they are not to be sadly solipsistic, must give rise to trust in others, in others' ability to work by that light, too; if only intermittently, by most of us. At this moment I usually remember Forster's idea of "rent", paid to sustain the idea of virtue in what might seem unlikely people and places. John Masefield has a little-known, curious, odd, but equally apt and homely passage in Odtaa:

I have seen flowers come in stony placesAnd kind things done by men with ugly faces,And the gold cup won by the worst horse at the races,So I trust too.

One is bound to wonder how far the sense of shared convictions, of "best-known truths", has by now become fragmented in some parts of society. Here is a small but typical instance. A couple of years ago I was at a county fair in Guildford, in prosperous south-east England. Nearby, two men, each with a boy of about ten, greeted each other. Lower-middle-class minor executives, from the look and sound of them. One, with a macho smile, almost casually set his boy to square up to the other for a fight. The second boy's father then encouraged his son to do the same. It was as if they said to themselves: "They might as well learn that's the way the world wags. You have to fight your corner or go to the wall."

It was as if all family influence, all talk, all writing, all efforts at education, all broadcasting about the nature of a civil society had passed them by. Perhaps they and their families had no such hinterland. Perhaps they themselves lived in a totally catch-as-catch-can, aggressive commercial world. Did they conduct their homes according to such principles, in so loveless a way? Or did those attitudes belong to a separate compartment? Did what I saw belong to a code of practice reserved for the world outside? If the schoolteachers tried to do anything to "gentle" those boys, would they be doing it against the odds, against the fathers' crude machismo? Would some of their teachers by now expect no more, no better? This is the point at which some people will interject that most people have to live in "the real world"; an insensitive and reductive phrase brought into service today whenever any aspect of behaviour is called into question or judged.

Looking across the people I have met in a lifetime, I sometimes wonder whether "the moral sense" is in some innate, in others not, and hard to convey. If someone is kicked to death without apparent cause or remorse, the kicker is likely to be described as a "psychotic", which, though it sounds "professional", can be replaced by the more open words "psychologically maimed" or "deranged"; it is no more than a label, does not clarify the nature/nurture question. Can material comfort help the humane spirit to emerge? Was Forster right to say: "Money pads the edges of things. God help those who have none"? Perhaps, to some extent. Yet there are plenty of well-brought-up and well-to-do ne'er-do-wells and virtuous poor. Meanwhile, in "developed" societies as elsewhere, many forms of cruelty are endemic. How do detectives who regularly deal with the worst cases survive, or some prison warders? A detective once said to me: "You must bear in mind that most criminals are not very bright." Curiously, that came as a slight relief, obviously to him, and then to me.

Is a developed moral sense a product of intelligence with imagination, the capacity to feel another's pain, to empathise, to assume a human "belonging"? One feels like not trusting anyone who cannot occasionally laugh at the sheer lunatic awful oddity of the world. That ability, too, is an aspect of the imagination in action. Yet many people neither intellectual nor apparently very imaginative have a lively moral sense.

I used to think that the childhood cry "it isn't fair" indicated an immature refusal to accept the reality of life. "No, it isn't, and the sooner you realise that the better" seemed then a proper, if harsh, response. I now prefer to think of it as a natural and certainly outraged cry: that the world should be "fair"; a moral assertion.

In some people the moral sense does seem innate, of nature, just taken for granted. They are able to say or assume, as though drawing from an elemental source: "To live is itself a value judgement. To breathe is to judge." Alfred Whitehead was more sure here than many of us can easily be: "To be a full human agent . . . is to exist in a space defined by distinctions of worth." Iris Murdoch joined him half a century later by adding that innumerable forms of evaluation haunt our simplest decisions. Dostoevsky's Alyosha has his revelation in adult life, as he awakes from a dream; it had given him "a passion of pity" for the poor and downtrodden.

Behind all said so far is the implication that the main ethical principles cherished by humans have at their heart a considerable congruity in charity, as in Lear's: "Oh, reason not the need!/Allow not nature more than nature needs/Man's life is cheap as beast's"; which is partnered by "There but for the grace of God go I".

At another extreme are the unco guid, the over-insistent moralists, who clutch their own sense of virtue around them like a drab but all-enveloping cloak. They turn every whim and small event into a moral issue. They are masters of the mixed mode, of critical language and the minatory tone of voice. They have to inhabit a world totally secure in its own rightness. Even the smallest fancy or prejudice must be set against the one right way; or chaos would come again. They have a thousand ways of rejecting with moral scorn anything of which they disapprove or simply do not like, from beer to a choice of wallpaper. I was brought up in the company of one such and can still hear the grim voice like the growl of a dog that won't let go. "Nothing is more unpleasant than a virtuous person with a mean mind" (Pascal). "We never do evil so fully and cheerfully as when we do it out of conscience" (Bagehot).

The most challenging, puzzling and, at times, inspiring quality of all is "moral courage". "Moral courage" fails when, for fear of making others angry or disappointed, we do not tell them the full truth, especially if it casts doubt on their own acts or judgements. "Moral courage", aided by mental muddle, fails when we utter one or more of the many forms of: "If I don't do it [act to correct an ill], someone else will"; which can be used to justify ignoring almost anything from petty pilfering to inhumanity. "Moral courage" fails when we refuse to blow the whistle on corruption we see all around. "Moral courage" is essential in anyone in a position of authority; its failure in just those places is endemic, in the disinclination to defend one's subordinates against one's own superiors, and much else.

We who live in the comparatively free and prosperous world, and have "a marketable skill" that will always be likely to ensure a job, should appreciate with great humility our freedom to exercise moral courage. It is easier to stand up to a bullying boss if you know you can take your cards and find a job elsewhere. In some countries that amount of courage could be costly or fatal, and only the heroic will be able to practise it, as I found when working for the United Nations. Those staff most under regular and illicit pressure from the embassies of their native countries, and who knew what might be waiting for them back home if they refused to do as they were told, sometimes thought my stubborn resistances came easily, were ethically smug. One member of my staff, whom I rebuked for changing a resolution after I had passed it for publication, had clearly been put under pressure. He implicitly rebuked me in turn: "It is perhaps easier for you, after all?"

By now, listening to the believers on the BBC's Thought for the Day, both the language and the thought - whether Christian, Muslim or Buddhist - seem almost like foreign languages and ways of thinking. Yet some sense of external judgement remains. How will I, when very ill, face the end? By joining Henry James, after his first stroke, in the expectation of a great adventure, The Real Distinguished Thing now about to begin? By sharing Dr Johnson's dread? More mundanely, by calling out in hospital "If it gets me better treatment, I'll pay to go private"? I shall have to wait and see, as ever.

We have to be convinced that Dostoevsky was wrong: "If God is no longer believed in, then everything is permitted."

This essay is extracted from the author's newly published book "First and Last Things" (Aurum, £14.99)