A metal-organic-framework-based ion trap was designed via tailoring linker functionality as well as free -COOH density. The mixed-linker UiO-66-H2/H4 exhibits higher adsorption for Li+ ions than H4-free UiO-66-H2 because the H4 linker provides an additional -COOH group in the local region.