Potassium iron sulfate fluoride (KFeSO4F) is a high-voltage positive electrode material for potassium-ion batteries, but its practical performance remains limited due to its moderate electronic conductivity. In this study, we employed Mg ion doping in the Fe site of KFeSO4F to tune the crystallinity and ionic/electronic conductivity. Furthermore, we made a composite with carbon nanotubes to enhance the electrode’s electronic conductivity. In a K-ion cell filled with concentrated potassium bis(fluorosulfonyl)amide/triglyme electrolyte, the KFe0.95Mg0.05SO4F/CNT composite electrode delivers discharge (potassiation) capacities of 107 and 100 mAh g–1 in the first and 100th cycles at a rate of 0.1C with reasonable rate capability. UV–vis absorption spectroscopy studies of Mg-doped KFeSO4F powder samples showed a narrower band gap compared to KFeSO4F. Furthermore, from the combined results of X-ray diffraction and absorption spectroscopy studies, we found that multiple two-phase reaction mechanisms through the Fe3+/Fe2+ redox occurred during the reversible depotassiation/potassiation cycle.