Atrial fibrillation (AF) frequently coexists in the setting of myocardial infarction (MI), being associated with increased mortality. Nonetheless, temporal trends in the occurrence of AF complicating MI and in the prognosis of these patients are not well described. We examined temporal trends in prevalence of AF in the setting of MI and the effect of AF on prognosis in the community. We studied a population-based sample of 20,049 validated first-incident nonfatal hospitalized MIs among 35- to 74-year old residents of 4 communities in the Atherosclerosis Risk in Communities (ARIC) Study from 1987 through 2009. Prevalence of AF in the setting of MI increased from 11% to 15% during the 23-year study period. The multivariable adjusted odds ratio for prevalent AF, per 5-year increment, was 1.11 (95% confidence interval 1.04 to 1.19). Overall, in patients with MI, AF was associated with increased 1-year case fatality (odds ratio 1.47, 95% confidence interval 1.07 to 2.01) compared with those without AF. However, there was no evidence that the impact of AF on MI survival changed over time or differed over time by sex, race, or MI classification (all p values >0.10). In conclusion, co-occurrence of AF in MI slightly increased between 1987 and 2009. The adverse impact of AF on survival in the setting of MI was consistent throughout. In the setting of MI, co-occurrence of AF should be viewed as a critical clinical event, and treatment needs unique to this population should be explored further.