The moralistic fallacy is the mistake of supposing that reasons why it would be morally good or bad to feel some emotional response toward an object bear on whether that emotional response is fitting (i.e. on whether the object has the particular evaluative feature that it seems to you to have when you are feeling some particular emotional response toward it). For example, suppose you think it would be bad to be amused by a cutting joke made by some wit at the expense of your friend. You think that a good friend should be angry, not amused, at this quip. If you concluded on that basis that the joke was not really funny, that would be an instance of the moralistic fallacy. Maybe it’s funny, maybe it isn’t, but your moral reasons not be amused by it are irrelevant to that question. --Justin D’Arms interviewed by Andrea Scarantino.
Here I want to ignore the meta-ethical issues that drive Justin's comments. (Perhaps that's a mistake.) I am not convinced 'the funny' or 'the aesthetic' can be so easily screened off from moral considerations. I mean the previous sentences in three ways (I'll draw on Charlie Chaplin's Modern Times throughout) : first, sometimes X is funny in virtue of moral reasons; the slapstick on the assembly line of Charlie Chaplin's Modern Times, is funny, in part, because it is making a moral point (about exploitation, dehumanization, alienation). This can be readily acknowledged by the second observation: for, second, if the movie were fundamentally making fun of assembly line workers, it might be funny (there is a cruel, downward-kicking funny, after all), but it may also not be funny--not because of some second order reflection that you really ought not find it funny, but because what you're experiencing is not funny. One's experience of a cutting joke is not always akin to a patellar reflex or knee-jerk. (This can be readily experienced with children's movies where some of the jokes only appeal to the kids, who may be in stitched while the parents simply don't even chuckle at some scenes despite it being dark and there are no concerns about setting right example to the kids.) That is to say, in experiencing the film one is also drawn into a more general moral point of view -- that gives coherence to the film and also frames how one experiences each scene in it* --, and so something becomes funny because one is simultaneously empathizing or distancing oneself (etc.) from the main character/situation.
Third sometimes X is moral because it is funny. Let's leave aside Chaplin's intentions for Modern Times, and just stipulate it is funny (as I have done throughout here). It's not clear to me that without the humor and poignancy of the characters the movie would be especially moral. (It could be, of course.) For some it might be moral, but others may say -- 'look these are exaggerated and one-sided representations of labor relations--rather than it being moral, it's an attack on capitalism or represents only one class interest not the general interest (blah, blah, blah). The point is that such points of view get disarmed by the humor and, thereby, a 'class' gets humanized or capital-worker relations get made concrete. (I am not claiming humor is the only way to do this.)
So, to sum up: undeniable there are instances of the moralistic fallacy about the funny, including humor that is in bad taste, immoral (all things considered), or childish. But it does not follow that how we ought (morally) to respond, say, to a purported joke can't be an essential or integral part of the joke, or what's amusing. This conclusion is not surprising because so much humor is commentary on social status, authority, existing norms, taboos, etc., and we can be amused at various levels of sophistication.