This paper presents a methodology for numerically simulating the chloride diffusivity in mortar subjected to corrosion‐induced cracking with the aid of X‐ray microcomputed tomography (X‐ray µCT). In the research, the mortar sample with embedded steel rod was subjected to accelerated corrosion and then scanned by X‐ray µCT at consecutive corrosion periods of 0, 1,000, and 2,000 minutes. Upon the scanned CT images, a meso‐scale model consisting of multiple material phases with their intrinsic structures was built up and implemented into a finite element method for diffusion simulation. In the numerical simulation, the effects of multiple phases (void, crack, aggregate, rust, and interfacial transition zone between cement and aggregate) on the chloride diffusion of mortar are studied. Since the X‐ray µCT facilitates accurate local material information in time‐dependent and in situ manner, the diffusivity of mortar under different corrosion time and its spatial distribution characteristics (e.g., at different locations from the mortar surface) can be evaluated.