Common smut caused by Ustilago maydis is one of the dominant fungal diseases in plants. The resistance mechanism to U. maydis infection involving alterations in the cell wall is poorly studied. In this study, the resistant single segment substitution line (SSSL) R445 and its susceptible recurrent parent line Ye478 of maize were infected with U. maydis, and the changes in cell wall components and structure were studied at 0, 2, 4, 8, and 12 days postinfection. In R445 and Ye478, the contents of cellulose, hemicellulose, pectin, and lignin increased by varying degrees, and pectin methylesterase (PME) activity increased. The changes in hemicellulose and pectin in the cell wall after U. maydis infection were analyzed via immunolabeling using monoclonal antibodies against hemicellulsic xylans and high/low-methylated pectin. U. maydis infection altered methyl esterification of pectin, and the degree of methyl esterification was correlated with the resistance of maize to U. maydis. Furthermore, the relationship between methyl esterification of pectin and host resistance was validated using 15 maize inbred lines with different resistance levels. The results revealed that cell wall components, particularly pectin, were important factors affecting the colonization and propagation of U. maydis in maize, and methyl esterification of pectin played a role in the resistance of maize to U. maydis infection.