The production of sands in oil well production has long been a crucial and thorny issue, but many related technologies are either costly or ineffective. This study introduced a new aggregating reagent, pentaerythritol phosphate melamine salt (PPMS for short), for controlling this problem. PPMS was the reaction product of pentaerythritol, phosphoric acid, and melamine, and there was an amine and a phosphate ester (both are positively charged) in its chemical structure. It could effectively change the ζ potentials of solid particles and help them aggregate through hydrogen bonds and electrostatic interactions, thereby aggregated particles could settle down at the bottom of the pore holes without severe formation permeability damage, which plays a remarkable role in eliminating the co-production of formation particles with oil. PPMS exhibited an excellent performance when the concentration was 0.8 wt % under 60 °C at a neutral environment, at which PPMS (positively charged) not only can highly condense the double layer electric field but also can better react with clay particles (negatively charged) through adsorption and charge neutralization; thus the negative charge of clay surface could decrease to the minimum (almost 0 mV). At the same time, PPMS might have the potential to enhance oil recovery.