Corrosion of headed studs leads to the degradation of mechanical properties of shear connectors and thus decreases the durability of steel and concrete composite structures. The effect of concrete cracks on stud corrosion was investigated in this study. Accelerated corrosion tests on headed stud shear connectors and numerical simulation on chloride migration were presented. 3D corrosion morphologies of headed studs in concrete slabs with different concrete cover thicknesses and crack widths and depths were precisely measured by using an optical surface measurement technique. The results show that there was highly localized corrosion in the stud head, and cracks had significant effect on the corrosion distribution. Then, after finite element models for chloride migration were verified by experimental results, a parametric study was carried out. It was found that in concrete slab with higher crack depth, chloride concentration around the headed stud increased more rapidly, while the crack width had slight effect on the distribution of chloride concentration. Moreover, the length of the chloride transport path was found to be a significant parameter that affect the stud corrosion.