Influenza A virus (IAV) H1N1 infection is a constant threat to human health and it remains so due to the lack of an effective treatment. Since melatonin is a potent antioxidant and anti-inflammatory molecule with anti-viral action, in the present study we used melatonin to protect against H1N1 infection underin vitroandin vivoconditions. The death rate of the H1N1-infected mice was negatively associated with the nose and lung tissue local melatonin levels but not with serum melatonin concentrations. The H1N1-infected AANAT-/-melatonin-deficient mice had a significantly higher death rate than that of the WT mice and melatonin administration significantly reduced the death rate. All evidence confirmed the protective effects of melatonin against H1N1 infection. Further study identified that the mast cells were the primary targets of melatonin action, i.e., melatonin suppresses the mast cell activation caused by H1N1 infection. The molecular mechanisms involved melatonin down-regulation of gene expression for the HIF-1 pathway and inhibition of proinflammatory cytokine release from mast cells; this resulted in a reduction in the migration and activation of the macrophages and neutrophils in the lung tissue. This pathway was mediated by melatonin receptor 2 (MT2) since the MT2 specific antagonist 4P-PDOT significantly blocked the effects of melatonin on mast cell activation. Via targeting mast cells, melatonin suppressed apoptosis of alveolar epithelial cells and the lung injury caused by H1N1 infection. The findings provide a novel mechanism to protect against the H1N1-induced pulmonary injury, which may better facilitate the progress of new strategies to fight H1N1 infection or other IAV viral infections.