With corrupt criminals running rampant in the streets of Los Angeles, Marlowe faces a daunting task to preserve his own sense of morality. Nearly every one he meets seems to have some secret to hide, and even Marlowe isn't able to keep his hands completely clean. But he really, really wants to. He's got that moral code of his, and in the end, what depresses Marlowe the most is how low he has to go to stick to it.
Marlowe's desire to remain entirely moral is nothing but a pipe dream because he lives in a world that no longer upholds standard values of ethics. He's doomed to fail.
The Big Sleep can be considered a moral critique in its portrayal of the corruption of 1930s American society.