In this paper, the relationship between mechanical strength and void characteristics including porosity, the mean area of voids (MAV), and circularity was determined for the first time by analyzing the petrographic images of some cement mortars containing multi-walled carbon nanotubes (MWCNTs). The results showed that the compressive, tensile, and flexural strength for specimens containing 0.1% MWCNTs (optimum dosage of MWCNT) were 21, 12.5, and 9.5% more than that of the control samples, respectively. Also, it was shown that the application of MWCNTs can change the shape and the amount of voids, thereby imposing a significant impact on the mortar behavior. For the optimum dosage of MWCNTs, the porosity and MAV decreased about 63 and 71%, respectively, while the circularity enhanced 23% in comparison with the ordinary mortar samples. The void shape is one of the reasons for the enhanced properties of the MWCNT mortars. The image processing of the petrographic specimens and probability theorization revealed that the circularity of the voids had a significant impact on the flexural strength of the mortars, while the compressive strength was mostly affected by only the amount of porosity.