Histidine kinases (HK) are one of the main prokaryotic signaling systems. Two structurally conserved catalytic domains inside the HK enable autokinase, phosphotransfer, and phosphatase activities. Here, we focus on a detailed mechanistic understanding of the functional cycle of the WalK HK by a multi-scale simulation approach, consisting of classical as well as hybrid QM/MM molecular dynamics simulation. Strikingly, a conformational transition induced solely in DHp leads to the correct activated conformation in CA crucial for autophosphorylation. This finding explains how variable sensor domains induce the transition from inactive to active state. The subsequent autophosphorylation inside DHp proceeds via a penta-coordinated transition state to a protonated phosphohistidine intermediate. This intermediate is consequently deprotonated by a suitable nearby base. The reaction energetics are controlled by the final proton acceptor and presence of a magnesium cation. The slow rates of the process result from the high energy barrier of the conformational transition between inactive and active states. The phosphorylation step exhibits a lower barrier and down-the-hill energetics. Thus, our work suggests a detailed mechanistic model for HK autophosphorylation.