Hard carbon with rich mesopores is considered as one of the most promising anodes for potassium-ion batteries, resulting from its shortened ions diffusion distance, good electrolyte penetration ability, and highly released stress. However, the well-developed pore channels tend to separate graphite-domains and enlarge direct contact area between electrode/electrolyte, which easily cause discontinuous electrons transfer paths and extra electrolyte depletion, thus leading to poor rate performance and initial Coulombic efficiency (ICE). Hence, we propose polyaniline conductive layer coated hollow mesoporous carbon spheres (HMCS@PAN) tailored based on local protonation reaction strategy, which can enhance conductivity and simultaneously maintain considerable pore structure, accounting for an ultrahigh-rate performance (233.9 mAh/g at 5 A/g) and long cycling life (216.8 mAh/g at 5 A/g over 2000 cycles). Besides, PAN coating can inhibit the direct contact between inner pore channels and electrolyte and reduce the excessive depletion of active ions in the filling of pores with larger pore size, which is conducive to building an even, stable, and inorganic-rich solid electrolyte interphase (SEI) layer, resulting in an excellent ICE (70.7%). This work provides a guidance for the structure design of mesopore hard carbon to improve its rate and ICE.