While alumino- and borosilicate materials have paramount importance in catalysis, the molecular origin of their activity is not completely understood. This is mainly because the incorporation of heteroatoms into the silicate framework deteriorates the molecular order by generating local disorder that is particularly difficult to establish. Because of its local vision of ordered and disordered environments, solid-state nuclear magnetic resonance (NMR) can play a key role to solve this long-standing issue. Surfactant-directed layered silicate materials with short-range molecular order are particularly interesting model systems to study the local structures around Al or B heteroatoms because the synthesis, molecular structures, and simple 29Si NMR signatures of their pure-silicate forms are well understood. Various amounts of Al and B atoms were incorporated into their frameworks, and their consequences on the local structure were investigated by state-of-the-art multidimensional NMR measurements probing spatial proximities or bonding interactions between 29Si, 11B, 27Al, and 1H nuclei, an approach that could be extended to atomic substitution in an aluminosilicate clay and a new calcium borosilicate. These results were combined with molecular modeling to build and evaluate structural models that capture the local framework distortions and sometimes profound rearrangements resulting from the atomic substitutions. This reveals remarkable differences between the consequences of the incorporation Al or B in two distinct frameworks of otherwise strongly-related materials, and offers a unique opportunity to understand the properties that drive heteroatom incorporation.