Little is known about the tolerance mechanisms that reduce the negative effects of microbial infection on host fitness. Here, we demonstrate that the histone H3 lysine 9 methyltransferase G9a regulates tolerance to virus infection by shaping the response of the evolutionary conserved Jak-Stat pathway in Drosophila. G9a-deficient mutants are more sensitive to RNA virus infection and succumb faster to infection than wild-type controls, which was associated with strongly increased Jak-Stat dependent responses, but not with major differences in viral load. Genetic experiments indicate that hyperactivated Jak-Stat responses are associated with early lethality in virus-infected flies. Our results identify an essential epigenetic mechanism underlying tolerance to virus infection.