Potassium-ion batteries (KIB) are a promising complementary technology to lithium-ion batteries because of the comparative abundance and affordability of potassium. Currently, the most promising KIB chemistry consists of a potassium manganese hexacyanoferrate (KMF) cathode, a Prussian blue analog, and a graphite anode (723Whl−1 and 359Whkg−1 at 3.6V). No electrolyte has yet been formulated that is concurrently stable at the high operating potential of KMF (4.02V vs K+/K) and compatible with K+ intercalation into graphite, currently the most critical hurdle to adoption. Here we combine a KMF cathode and a graphite anode with a KFSI in Pyr1,3FSI ionic liquid electrolyte for the first time and show unprecedented performance. We use high-throughput techniques to optimize the KMF morphology for operation in this electrolyte system, achieving 119 mA h g−1 at 4 V vs K+/K and a coulombic efficiency >99.3%. In the same ionic liquid electrolyte graphite shows excellent electrochemical performance and we demonstrate reversible cycling by operando XRD. These results are a significant and essential step forward towards viable potassium-ion batteries.