Here’s the abstract of this lengthy, but interesting, research paper:

The current study investigated whether fiction experiences change empathy of the reader. Based on transportation theory, it was predicted that when people read fiction, and they are emotionally transported into the story, they become more empathic. Two experiments showed that empathy was influenced over a period of one week for people who read a fictional story, but only when they were emotionally transported into the story. No transportation led to lower empathy in both studies, while study 1 showed that high transportation led to higher empathy among fiction readers. These effects were not found for people in the control condition where people read non-fiction. The study showed that fiction influences empathy of the reader, but only under the condition of low or high emotional transportation into the story.