Potassium homeostasis is vital for all organisms, but is challenging in single-celled organisms like bacteria and yeast and immobile organisms like plants that constantly need to adapt to changing external conditions. KUP transporters facilitate potassium uptake by the co-transport of protons. Here, we uncover the molecular basis for transport in this widely distributed family. We identify the potassium importer KimA from Bacillus subtilis as a member of the KUP family, demonstrate that it functions as a K+/H+ symporter and report a 3.7 Å cryo-EM structure of the KimA homodimer in an inward-occluded, trans-inhibited conformation. By introducing point mutations, we identify key residues for potassium and proton binding, which are conserved among other KUP proteins.