Maybe he's hungry and hoping for food.
Defensive kingsnakes curl up with the head in a typical S-shape risen above the ground like this;
Also they may slam or rattle their tail into the ground.
When a snake comes out rapidly when there's movement, it's usually hungry. These snakes do not attack, they only defend, or at least I never saw any kingsnake going on the offense.. actually there's not many snakes that truly go into the offensive... usually it's all defense and get the heck away when they can.