Aims Evidence from longitudinal studies on the influence of area deprivation in cardiac mortality is limited. We aimed to examine the impact of area deprivation on cardiac mortality in a large representative Scottish population. We also examined differences between women and men. Methods and results Retrospective analysis was performed by using linked data from Scottish Longitudinal Study from 1991 to 2010. The main exposure variable was socioeconomic status using the Carstairs deprivation scores, a composite score of area-level factors. Cox proportional-hazards models were constructed to evaluate the hazard ratios (HRs) and 95% confidence intervals (CIs) for cardiac mortality and all-cause mortality associated with area-based deprivation. Subgroup analyses were stratified by sex. In a representative population of 217 965 UK adults, a total of 58 770 deaths occurred over a median of 10 years of follow-up period. The risk of cardiac mortality and all-cause mortality showed a consistent graded increased across the deprived groups. Compared to the least deprived group, the adjusted HR of cardiac mortality in the most deprived group was 1.27 (1.15–1.39, P < 0.000). There was strong evidence that women from more deprived areas had significantly higher cardiac death risk than those from the least deprived areas (HR 1.42, 95% CI 1.22–1.65), while this observation was not strong in men with same background. Conclusion Our study demonstrated area deprivation was the strong predictor of long-term cardiac mortality and all-cause mortality. The inequalities were substantially greater in women from more deprived areas than men from the same background.