Potassium ion batteries attract great attentions on account of their inherent advantages, such as high working voltage, low cost and abundant resources. However, safety issues and low energy density hinder their practical application. Herein, we successfully demonstrate a highly safe all-solid-state potassium-ion battery with a poly(ethylene oxide)-bis(flourosulfonyl)imide potassium based solid polymer electrolyte and a binder-free, three-dimensional, array-structured Ni3S2 electrode. It is found that the PEO-based SPE can not only address the safety issues but also enhance the cycling performance of the Ni3S2 by restricting the diffusion of polysulfides. The all-solid-state Ni3S2–K batteries show a high reversible capacity and a good cycling performance at 55 °C. Moreover, the Ni3S2 electrode could be used not only as the cathode for potassium batteries with potassium metal as anode but also the anode for potassium-ion batteries.