Patients are at increased risk of dementia, including Alzheimer's disease (AD), after myocardial infarction (MI), but the biological link between MI and AD is unclear. To understand the association between the pathogenesis of MI and AD and identify common biomarkers of both diseases. Using public databases, we identified common biomarkers of MI and AD. Least absolute shrinkage and selection operator (LASSO) regression and protein-protein interaction (PPI) network were performed to further screen hub biomarkers. Functional enrichment analyses were performed on the hub biomarkers. Single-cell/nucleus analysis was utilized to further analyze the hub biomarkers at the cellular level in carotid atherosclerosis and AD datasets. Motif enrichment analysis was used to screen key transcription factors. 26 common differentially expressed genes were screened between MI and AD. Function enrichment analyses showed that these differentially expressed genes were mainly associated with inflammatory pathways. A key gene, Regulator of G-protein Signaling 1 (RGS1), was obtained by LASSO regression and PPI network. RGS1 was confirmed to mainly express in macrophages and microglia according to single-cell/nucleus analysis. The difference in expression of RGS1 in macrophages and microglia between disease groups and controls was statistically significant (p < 0.0001). The expression of RGS1 in the disease groups was upregulated with the differentiation of macrophages and microglia. RelA was a key transcription factor regulating RGS1. Macrophages and microglia are involved in the inflammatory response of MI and AD. RGS1 may be a key biomarker in this process.