Assume both atheism and moral realism are true. Can a religious text, such as the Bible, still be a reliable moral guide? Or do the religious aspects invalidate the entire text?
To put this another way, can fiction offer moral knowledge?
Philosophy Stack Exchange is a question and answer site for those interested in the study of the fundamental nature of knowledge, reality, and existence. It only takes a minute to sign up.Sign up to join this community
At face value, assuming moral realism, there's no reason any text whatsoever couldn't contain valid moral knowledge. Just start with valid moral knowledge, and add whatever you want to it. There are many atheists who do take the Bible in this manner --as some valid moral principles surrounded by a lot of (what they consider) nonsense. However, it's clear that your question is oriented towards principles that originate in the Bible (or in the religious communities that produced the Bible), not ones that it merely collects from external sources.
There is a wealth of what we might call "secularizable" moral values in the Bible. For instance, Jesus preaches at length about our responsibilities towards the poor and oppressed. Many secular humanists, such as Kurt Vonnegut, have espoused moral systems that are (fairly openly) secularized versions of Christian morality. With all that said, many of the moral precepts in the Bible are directly about the relationship with God. For those to be valid, God must be real. Conversely, a number of other Biblical moral precepts --including some of the ones the humanists most admire --are derived from the relationship with God. If those precepts are valid, it at least suggests the realness of the source. One of Jesus' own principles is to judge the tree by the fruit. If the fruit is a moral system, and we judge it good, then shouldn't we give the tree (Christianity) the benefit of the doubt?
Your final question is whether fiction can convey moral knowledge: Arguably this is true of much of good fiction. It dramatizes either good or bad moral choices, and we, the audience, learn from the experiences of the characters. The parables of Jesus can be viewed in this light, but they are almost exclusively oriented around the relationship with God. If we choose to view the stories of the Old Testament prophets in the same light, we see the same thing. (As far as stories from what are usually classified as the "historical" books of the Bible, it is often more than difficult to derive any moral lessons from them at all.)
It is difficult to understand how we can still speak about Biblical revelation if we assume that atheism is true. ;-)
If you believe that Erich von Däniken is right and all the gods were just aliens which made contact with humanity... sure, in that case, a wise extraterrestrial could have revealed itself to the ancient Israelites (and they got a little bit confused). That could be a justification to take the biblical commandments seriously even if atheism is true.
But such "revelation" would still be just an appeal to authority.
If we don't make such fringe assumptions and atheism is true, then much of the Bible would be a very, very questionable authority.
To follow the Ten Commandments "just because" would be far less justifiable than arguing "Aristotle said that this is morally wrong, so it is morally wrong." – at least Aristotle didn't fraudulently claim / suffered from the illusion that his moral judgements came directly from God himself.
On the other hand, I don't know any meta-philosophical view that a fictional context would be a decisive refutation of any philosophical argument. No argument for Externism is disproved just by the fact that Externism is a fictional philosophical theory nobody took ever seriously.
But is there moral-philosophical argumentation in the Bible?
Ecclesiastes is a "self contained" very philosophical book of the Bible, which still makes sense if atheism is true. But it doesn't contain much moral philosophy.
One could also say that sometimes Jesus tried to sketch a philosophical justification for his moral guidelines, though most of it just doesn't make sense in a non-theistic context.