Myocarditis and dilated cardiomyopathy (DCM) are often caused by viral infections and occur more frequently in men than in women, but the reasons for the sex difference remain unclear. The aim of this study was to assess whether gene changes in the heart during coxsackievirus B3 (CVB3) myocarditis in male and female BALB/c mice predicted worse DCM in males. Although myocarditis (P = 4.2 × 10(-5)) and cardiac dilation (P = 0.008) were worse in males, there was no difference in viral replication in the heart. Fibrotic remodeling genes, such as tissue inhibitor of metalloproteinase (TIMP)-1 and serpin A 3n, were upregulated in males during myocarditis rather than during DCM. Using gonadectomy and testosterone replacement, we showed that testosterone increased cardiac TIMP-1 (P = 0.04), serpin A 3n (P = 0.007), and matrix metalloproteinase (MMP)-8 (P = 0.04) during myocarditis. Testosterone increased IL-1β levels in the heart (P = 0.02), a cytokine known to regulate cardiovascular remodeling, and IL-1β in turn increased cardiac serpin A 3n mRNA (P = 0.005). We found that 39 of 118 (33%) genes identified in acute DCM patients were significantly altered in the heart during CVB3 myocarditis in mice, including serpin A 3n (3.3-fold change, P = 0.0001). Recombinant serpin A 3n treatment induced cardiac fibrosis during CVB3 myocarditis (P = 0.0008) while decreasing MMP-3 (P = 0.04) and MMP-9 (P = 0.03) levels in the heart. Thus, serpin A 3n was identified as a gene associated with fibrotic cardiac remodeling and progression to DCM in male myocarditis patients and mice.