Nuclear magnetic resonance has been applied in well logging to investigate pore size distribution with high resolution and accuracy based on the relaxation time distribution. However, due to the heterogeneity of natural rock, pore surface relaxivity, which links relaxation time and pore size, varies within the pore system. To analyze and alter pore surface relaxivity, we saturated Boise sandstone cores with positively charged zirconia nanoparticle dispersions in which nanoparticles can be adsorbed onto the sandstone pore wall, while negatively charged zirconia nanoparticles dispersions were used as a control group to provide the baseline of nanoparticle retention due to nonelectrostatic attraction. We have performed core flushing with deionized water, pure acid, and alkali with different pH values; compared properties of zirconia nanoparticles before and after exposure to Boise sandstone; analyzed the portion of zirconia nanoparticles retained in the rock; altered pore surface relaxivity; and linked the adsorbed nanoparticle concentration on the pore surface to the modified surface relaxivity. Our work has indicated that after two pore volumes of core flooding, there was approximately 1% of negatively charged nanoparticles trapped in the Boise sandstone core, whereas approximately 8%–11% of positively charged nanoparticles was retained in the Boise sandstone cores. Our results indicated that besides van der Waals attraction, electrostatic attraction was the driving force for retention of nanoparticles with a positive surface charge in sandstone cores. The attachment of nanoparticles onto sandstone surfaces changed the mineral surface relaxivity. Exposure to acidic or strong alkaline conditions increased the Boise sandstone surface relaxivity. After contact with Boise sandstone, the nanoparticles themselves exhibited increased relaxivity due to interactions between nanoparticles dispersion and mineral surface under different pH conditions.