BACKGROUND: The reduction of myocardial infarction (MI) and narrowing the gap between the populations with and without diabetes are important goals of diabetes care. We analyzed time trends for sex-specific incidence rates (IR) of first MI (both non-fatal MI and fatal MI) as well as separately for first non-fatal MI and fatal MI in the population with and without diabetes. METHODS: Using data from the KORA myocardial infarction registry (Augsburg, Germany), we estimated age-adjusted IR in people with and without diabetes, corresponding relative risks (RR), and time trends from 1985 to 2016 using Poisson regression. RESULTS: There were 19,683 people with first MI (34% fatal MI, 71% men, 30% with diabetes) between 1985 and 2016. In the entire study population, the IR of first MI decreased from 359 (95% CI: 345-374) to 236 (226-245) per 100,000 person years. In men with diabetes, IR decreased only in 2013-2016. This was due to first non-fatal MI, where IR in men with diabetes increased until 2009-2012, and slightly decreased in 2013-2016. Overall, fatal MI declined stronger than first non-fatal MI corresponding to IRs. The RR of first MI substantially increased among men from 1.40 (1.22-1.61) in 1985-1988 to 2.60 (2.26-2.99) in 1997-2000 and moderately decreased in 2013-2016: RR: 1.75 (1.47-2.09). Among women no consistent time trend for RR was observed. Time trends for RR were similar regarding first non-fatal MI and fatal MI. CONCLUSIONS: Over the study period, we found a decreased incidence of first MI and fatal MI in the entire study population. The initial increase of first non-fatal MI in men with diabetes needs further research. The gap between populations with and without diabetes remained.