Adsorption is known as the best technique to remove dyes from waste water, and the choice of adsorbent is the most important factor. In this regard, some commercial porous materials have been applied for a long time as popular adsorbents for dye adsorption. However, the search for new classes of porous materials is still attractive to researchers. Recently, metal-organic frameworks are seen to be promising candidates as adsorbents for dyes due to their large surface area, ordering, and flexible structure. There are some possible mechanisms for the dye adsorption in water performed on metal-organic frameworks, including the electrostatic interaction forming attractive charge of dye molecules and adsorbents, pi-pi stacking of organic rings from dye and metal-organic frameworks, hydrogen bonding between the dye and hydroxyl group of the metal-organic frameworks, hydrophobic interaction, acid-base interaction and effect of framework structure. Among them, the electrostatic attraction mechanism plays an important role in dye adsorption on MOFs, highlighting differences as compared to traditional adsorbents in this field. This work is the first detailed investigation into the effect of electrostatic attraction mechanism in dye adsorption on UiO-66 and their modifications. Two samples of Co/UiO-66 and H+/UiO-66 were prepared under normal stirring and heating conditions to increase the positive charge of the surface. The characterization using powder X-ray diffraction (XRD), scanning electron microscopy (SEM) and FTIR indicated the existence of proton on UiO-66, while Raman spectroscopy and inductively coupled plasma mass spectrometry (ICP-MS) confirmed the successful addition of cobalt into the UiO-66 structure at the amount of about 0.6 wt %. Results obtained for methyl orange (MO) adsorption on the surface have shown enhanced adsorption capacity for both Co-UiO-66 and H+/UiO-66 as compared to parent UiO-66. Moreover, the experiments with highly selective removal of anionic dye as compared to cationic dye were performed and explained in detail for mixed dye solutions of MO with methylene blue (MB), indicating the important role of electrostatic attraction mechanism. Notably, it is shown that the addition of Co to UiO-66 results in a higher effect of electrostatic interaction than that of H+.