A three dimensions mathematical modeling was developed with COMSOL 3.2 software of an electroremediation cell. The Navier Stokes and Darcy equations were used to model the behavior of the electrolyte and the sand, respectively. The mass balance for hydrogen ion was carried out with Nernst-Planck equation for the anode and soil regions. The main factors that contribute to the hydrogen ion balance were the diffusive flux and electric migration. The mathematical modeling was validated with an experimental arrangement consisted in an electroremediation cell which contains sand as porous medium and water as electrolyte. A potential of 20 V was applied for 24 hours and the pH was measured continuously. The results of the model are in good agreement with those obtained experimentally.