Robert G. Ingersoll has gone looking for this moral message in the bible and describes his thoughts about the moral codes he has found in this article, from which I have extracted these few paragraphs:
On the whole, the Old Testament cannot be considered a moral guide. Jehovah was not a moral God. He had all the vices, and he lacked all the virtues. He generally carried out his threats, but he never faithfully kept a promise. At the same time, we must remember that the Old Testament is a natural production, that it was written by savages who were slowly crawling toward the light. We must give them credit for the noble things they said, and we must be charitable enough to excuse their faults and even their crimes.
I know that many Christians regard the Old Testament as the foundation and the New as the superstructure, and while many admit that there are faults and mistakes in the Old Testament, they insist that the New is the flower and perfect fruit. I admit that there are many good things in the New Testament, and if we take from that book the dogmas of eternal pain, of infinite revenge, of the atonement, of human sacrifice, of the necessity of shedding blood; if we throw away the doctrine of non-resistance, of loving enemies, the idea that prosperity is the result of wickedness, that poverty is a preparation for Paradise, if we throw all these away and take the good, sensible passages, applicable to conduct, then we can make a fairly good moral guide,—narrow, but moral.
Of course, many important things would be left out. You would have nothing about human rights, nothing in favor of the family, nothing for education, nothing for investigation, for thought and reason, but still you would have a fairly good moral guide. On the other hand, if you would take the foolish passages, the extreme ones, you could make a creed that would satisfy an insane asylum. If you take the cruel passages, the verses that inculcate eternal hatred, verses that writhe and hiss like serpents, you can make a creed that would shock the heart of a hyena. It may be that no book contains better passages than the New Testament, but certainly no book contains worse. Below the blossom of love you find the thorn of hatred; on the lips that kiss, you find the poison of the cobra. The Bible is not a moral guide. Any man who follows faithfully all its teachings is an enemy of society and will probably end his days in a prison or an asylum.
These facts in general, these histories in outline, the results reached, the conclusions formed, the principles evolved, taken together, would form the best conceivable moral guide. We cannot depend on what are called “inspired books,” or the religions of the world. These religions are based on the supernatural, and according to them we are under obligation to worship and obey some supernatural being, or beings. All these religions are inconsistent with intellectual liberty. They are the enemies of thought, of investigation, of mental honesty. They destroy the manliness of man. They promise eternal rewards for belief, for credulity, for what they call faith. This is not only absurd, but it is immoral.
These religions teach the slave virtues. They make inanimate things holy, and falsehoods sacred. They create artificial crimes. To eat meat on Friday, to enjoy yourself on Sunday, to eat on fast-days, to be happy in Lent, to dispute a priest, to ask for evidence, to deny a creed, to express your sincere thought, all these acts are sins, crimes against some god, To give your honest opinion about Jehovah, Mohammed or Christ, is far worse than to maliciously slander your neighbor. To question or doubt miracles. is far worse than to deny known facts. Only the obedient, the credulous, the cringers, the kneelers, the meek, the unquestioning, the true believers, are regarded as moral, as virtuous. It is not enough to be honest, generous and useful; not enough to be governed by evidence, by facts. In addition to this, you must believe. These things are the foes of morality. They subvert all natural conceptions of virtue.