The porosity of clay aggregates is an important property governing chemical reactions and fluid flow in low-permeability geologic formations and clay-based engineered barrier systems. Pore spaces in clays include interlayer and interparticle pores. Under compaction and dewatering, the size and geometry of such pore spaces may vary significantly (sub-nanometer to microns) depending on ambient physical and chemical conditions. Here we report a molecular dynamics simulation method to construct a complex and realistic clay-like nanoparticle aggregate with interparticle pores and grain boundaries. The model structure is then used to investigate the effect of dewatering and water content on micro-porosity of the aggregates. The results suggest that slow dewatering would create more compact aggregates compared to fast dewatering. Furthermore, the amount of water present in the aggregates strongly affects the particle-particle interactions and hence the aggregate structure. Detailed analyses of particle-particle and water-particle interactions provide a molecular-scale view of porosity and texture development of the aggregates. The simulation method developed here may also aid in modeling the synthesis of nanostructured materials through self-assembly of nanoparticles.