Most of War and Peace's points about morality are made through quiet, unpunctuated irony – like when we see the standard church service's calls for world peace interrupted by a long sermon urging believers to pray for success in war. Almost nothing is entirely spelled out by the narrator. Instead, we pick up on the kinds of hypocrisies and discrepancies of ethics life is filled with through the eyes of the characters – for instance, Pierre's totally different reactions to witnessing deaths during battle and later watching soldiers execute prisoners. The distinction is profound, but it requires the reader's attention to catch and ponder.
Although following a moral code would seem to ensure strictly ethical behavior, in practice most characters are able to convince themselves that whatever they want to do falls within the realm of whatever principles they claim to espouse. In other words, they twist their morals to suit their desires.
War would seem to be a case of the simplest kind of ethics: "might makes right." But instead, the book shows war to be ambiguous, complicated, and even nonsensical. (Half the time no one knows who won a particular battle, and both sides claim victory.)