You devise a test for obeying the moral, and administer the test to a bunch of subjects before and after reading the story. For example, if the story is Hamlet, you can give an opportunity to back-stab their boss in order to get yet another promotion. Are they less likely to do it after seeing how badly it went for the young thane? Not an easy test to do, but possible in principle.
Joshua Greene's lab at Harvard (http://www.joshua-greene.net/) measured subjects making major moral decisions and found, for example, that people who'd received training in medical ethics made more utilitarian decisions about life and death. You could apply the same methods to morals of stories in a randomized trial by having some subjects read them and some not.
That's not measuring the existence of morality though. It's measuring whether certain things can influence behavior. And because it's a lab study, the behavior tends to be fairly trivial in practice.
Besides studying whether people behave morally is begging the question if the question is "do morals exist?".
Joshua Greene's lab at Harvard (http://www.joshua-greene.net/) measured subjects making major moral decisions and found, for example, that people who'd received training in medical ethics made more utilitarian decisions about life and death. You could apply the same methods to morals of stories in a randomized trial by having some subjects read them and some not.