Although the inverse association between socioeconomic status (SES) and cardiovascular disease (CVD) is well established, research on the effect of changes in the SES throughout life on CVD risk in populations with different social backgrounds remains scarce. This study aimed to assess the relationship between childhood SES, adulthood SES, and changes in SES over time, and CVD incidence and mortality in a Polish urban population. In addition, the predictive performance of the SES index was compared with education alone. A cohort study with a 10-year follow-up was conducted, in which a random sample of 10,728 residents in Kraków aged 45-69 years were examined. The SES was assessed at baseline using data on education, parents' education, housing standard at the age of 10 years, professional activity, household amenities, and difficulties in paying bills and buying food. SES categories (low, middle, and high) were extracted using cluster analyses. Information on new CVD cases was obtained from questionnaires in subsequent phases of the study and confirmed by reviewing clinical records. Data on deaths and causes were obtained from the residents' registry, Central Statistical Office, and the participants' families. The effect of the SES index on the risk of CVD was assessed using Cox proportional hazard models. In male and female participants, the CVD incidence and mortality were observed to be 27,703 and 32,956 person-years (384 and 175 new CVD cases) and 36,219 and 40,048 person-years (159 and 92 CVD deaths), respectively. Childhood SES was not associated with CVD incidence and mortality. A protective effect of high adulthood SES against CVD mortality was observed in men and women (HR = 0.59, 95% CI = 0.31-0.97; HR = 0.33, 95% CI = 0.14-0.75, respectively). In women, downward social mobility was related to 2.24 and 3.75 times higher CVD incidence and mortality, respectively. In men, a protective effect against mortality was observed in upward mobility (HR = 0.50, 95% CI = 0.29-0.84). Model discrimination was similar for the SES index and education alone for the association with CVD incidence. In women, the SES index was a slightly better predictor of CVD mortality than education alone (C-index = 0.759, SE = 0.0282 vs. C-index = 0.783, SE = 0.0272; p = 0.041). In conclusion, high adulthood SES, but not childhood SES, may be considered to be a protective factor against CVD in urban populations in high-CVD-risk regions. No effects of critical periods in early life were observed on CVD risk. In later life, social mobility was found to affect CVD mortality in both men and women. In men, a protective effect of upward mobility was confirmed, whereas in women, an increased CVD risk was related to downward mobility. It can be concluded that CVD prevention may be beneficial if socioeconomic potentials are strengthened in later life.