Activated biochar (i.e., a by-product of biomass pyrolysis) is developed as a renewable, low-cost, and promising carbon-based electrode for capacitive deionization (CDI) of NaCl and ZnCl2 solutions. High surface area biochar samples (i.e., between 971 and 1675 m2 g−1) are prepared with three types of tailored porous structure: (a) predominately microporous (87% of total pore volume), (b) mesoporous (72% of total pore volume), and (c) a combination of both structures. The effect of the different porous structures, including also the sub-nanometer pore size ranges, on the electrosorption of Na+ and Zn2+ is studied by electrochemical techniques (i.e., cyclic voltammetry, galvanostatic charge/discharge, and batch-mode electrosorption) complemented by surface structural and compositional analysis. For NaCl removal, all samples showed promising capacity (i.e., up to 5.39 mg NaCl g−1) and durability through four consecutive adsorption/regeneration cycles. In case of ZnCl2 on the other hand, the microporous sample experienced considerable drop in removal capacity (>75% drop) from cycle nr. 1 to 4. Interestingly, the sample with mostly mesoporous structure showed the highest removal capacity and durability for Zn2+ removal. These results emphasize the importance of tailoring the porous structure of the biochar electrode material as a function of the specific size of adsorbate ions to improve the CDI performance.