Cardioembolism (CE) is a prevalent cerebrovascular disease in clinical practice. This study aims to assess the predictive efficacy of right heart contrast echocardiography combined with the Score for Targeting Atrial Fibrillation (STAF) for diagnosing CE. A total of 149 patients with CE and 93 patients with non-CE (NCE) were classified into the study group and control group, respectively, and their data were retrospectively analyzed. All patients underwent right heart contrast echocardiography and STAF assessment, and comparative analyses between the groups were performed. In addition, the predictive potential of combining right heart contrast echocardiography with STAF for CE was evaluated, and the CE patients underwent a one-year follow-up to assess survival and prognostic factors. The results of this study showed that patients in the CE group had higher incidences of grade 1 + 2 + 3 right-to-left shunt, patent foramen ovale (PFO) positivity, greater foramen ovale length, larger shunt inner diameter, and higher STAF score compared to the NCE group (p < 0.05). Receiver operating characteristic curve analysis revealed that the predictive values for CE, in terms of right-to-left shunt grade, PFO positivity, foramen ovale length, shunt inner diameter, and area under the curve (AUC) for STAF, were 0.582, 0.570, 0.679, 0.808 and 0.750, respectively. The combined AUC value for all these parameters was 0.905. Univariate and multiple logistic regression analysis indicated that atrial fibrillation, total cholesterol and fibrinogen were not prognostic factors in CE patients (p > 0.05), whereas National Institute of Health stroke scale (NIHSS) score, PFO positivity, foramen ovale length and STAF at admission were prognostic factors (p < 0.05). Therefore, combining right heart contrast echocardiography with STAF may enhance the predictive efficacy for CE.