How the King Moves in Chess
The rules, how to keep it safe, and when to bring it out
The short answer
The king moves one square in any direction: forwards, backwards, sideways or diagonally. It captures the same way. It may never move onto a square that an enemy piece attacks, and it may never stand next to the other king. Once per game it can also castle, the only move in which the king travels two squares.
The king is the most important piece on the board, because the whole game is about it. If your king is attacked and has no way out, that is checkmate and you lose. That makes the king the one piece you can never trade, and the one piece whose safety decides how every other piece should be played.
One square in every direction
From the middle of the board the king has eight squares around it. On the edge it has five, and in a corner only three. That short reach is why a king can be trapped so easily: one enemy rook or queen can take away a whole row of its squares at once.
The king moves like a queen that is limited to a single step. Like every piece except the knight, it cannot jump: it simply walks to a neighbouring square, and if that square holds an enemy piece, it captures it. If you are not sure how the other pieces compare, the overview of how all the chess pieces move puts them side by side.
The king can never move into check
A square attacked by an enemy piece is off limits to your king. It does not matter whether the attacker is a pawn, a queen or the enemy king. The same rule works the other way round: you may not make any move, with any piece, that leaves your own king attacked.
The second diagram shows a rule that surprises many beginners. Because a king attacks every square around it, the two kings can never touch. There is always at least one empty square between them. That rule is the whole basis of the opposition, which you will meet in the endgame section below.
Capturing with the king
The king can take an enemy piece next to it, but only if that piece is not defended. Taking a defended piece would mean moving into check.
Check, checkmate and stalemate
- Check: your king is attacked. You must get out of it on your very next move, by moving the king, blocking the attack or capturing the attacker.
- Checkmate: your king is attacked and none of those three escapes works. The game is over and you have lost.
- Stalemate: your king is not attacked, but you have no legal move at all. The game is a draw, which is why a winning side has to be careful not to box the enemy king in without checking it.
The full rules are in the lesson on check and checkmate, and the drawing trap is explained in stalemate rules and traps. The king is never actually captured: the game stops the moment it would be.
Castling: the king's one special move
Once per game, the king can move two squares toward one of its rooks while that rook jumps over it to the other side. Kingside castling (O-O) puts White's king on g1, and queenside castling (O-O-O) puts it on c1. You may castle only if the king and that rook have never moved, the squares between them are empty, and the king is not in check, does not pass through an attacked square and does not land on one.
Every condition, with diagrams of the tricky cases, is in the full castling rules lesson.
King safety in the opening and middlegame
While the queens and plenty of pieces are on the board, the king is a target, not a fighter. A queen and a rook or bishop working together can mate a king that is left in the open, so the job in the first part of the game is to tuck it away. A few habits do most of the work:
- Castle early. In most openings, develop the knight and bishop on one side and castle within the first ten moves, before the centre opens.
- Leave the pawn shield alone. After castling kingside, the pawns on f2, g2 and h2 are the king's wall. Every one you push leaves a hole an enemy piece can use.
- Watch the open files and diagonals. A rook on a file that leads to your king, or a bishop and queen aimed at h7 or h2, are early warnings of an attack.
- Don't walk the king out to grab material. Taking a pawn with the king in the middlegame often costs far more than the pawn.
- Make room before you need it. A move like h3 (or h6 for Black) gives a castled king an escape square, so a rook on the back rank cannot mate it.
The quickest way to see what happens to an unsafe king is the shortest mate in chess, 1.f3 e5 2.g4 Qh4#. White opened the diagonal from h4 to e1 and the king had nowhere to go. More attacking patterns like the back-rank and smothered mates are in checkmate patterns every player should know.
In the endgame the king becomes an attacker
Once the queens are off and only a few pieces are left, the danger of mate mostly disappears and the king turns into a strong piece. It defends its own pawns, attacks the enemy's, and escorts a passed pawn to promotion. Many coaches put its fighting value in the endgame at about four pawns. Treat that as a teaching estimate rather than an exact figure, but the point is real: a king left on g1 while the other king marches to the centre is often the difference between a win and a loss.
The opposition
Because kings can never stand next to each other, two kings facing each other with one square between them block each other. The player who does not have to move is said to have the opposition, and the other king has to give way. In king and pawn endings that one tempo often decides the game.
With Black to move, the black king must give way: after 1...Kd7 2.Kf6 White's king gets in front of the pawn and pushes it through. With White to move, Black keeps the opposition. After 1.Kd5 Kd7 2.e5 Ke7 3.e6 Ke8! 4.Kd6 Kd8 5.e7+ Ke8 6.Ke6 Black has no legal move and it is stalemate.
The opposition, the key squares in front of a pawn and the basic mates with a queen or rook are all in the basic chess endgames lesson. You can also set an ending up in the best move calculator and see which king move Stockfish chooses.
Common king mistakes
Leaving the king in the centre too long.
Castle before the e- and d-files open.
Pushing the pawns in front of a castled king.
Only do it with a clear reason, such as making an escape square.
Forgetting the back rank.
If all three pawns are still in front of your castled king, a single rook check on the back rank can be mate.
Keeping the king passive in the endgame.
Once the queens are gone, bring the king to the centre.
Walking into a discovered or double check.
Before every king move, check every line an enemy piece could open.
Frequently asked questions
How does the king move in chess?
One square in any direction: forwards, backwards, sideways or diagonally. The only exception is castling, when the king moves two squares toward a rook and the rook jumps over it.
Can the king move into check?
No. A king may never move to a square attacked by an enemy piece, and no move of any piece may leave your own king in check. Such a move is illegal, and in a tournament it has to be taken back.
Can a king take a piece?
Yes, the king captures the same way it moves, one square in any direction. It cannot capture a piece that is defended, because it would be moving into check.
Can two kings stand next to each other?
No. Every square next to a king is attacked by that king, so the other king can never step onto it. The two kings always have at least one square between them.
Can the king be captured?
No. The game ends one move earlier: when the king is in check and has no legal way out, that is checkmate and the game is over. The king itself is never taken off the board.
How much is the king worth?
The king has no material value because losing it loses the game. As a fighting piece in the endgame, many coaches estimate it at about four pawns, but that is a teaching guide, not a rule.
Can the king move two squares?
Only when castling. In every other case the king moves exactly one square. Castling is allowed only if neither the king nor that rook has moved and the king does not pass through or land on an attacked square.
Related lessons
- Castling rulesEvery condition for O-O and O-O-O, the squares that must be safe, and when to castle.
- Check and checkmate rulesWhat check is, the three ways out of it, double and discovered check, and when it is mate.
- Basic chess endgamesQueen and rook checkmates, the opposition, and king and pawn endings.
- Stalemate rules and trapsWhy having no legal move is a draw, the traps that throw away wins, and how to save lost games.
- How chess pieces moveHow the king, queen, rook, bishop, knight and pawn move and capture, and what each is worth.
- Chess piece valuesWhat each piece is worth in pawns, the bishop pair, and when a trade wins or loses material.
Or browse all free chess lessons.
Practise keeping your king safe in real games.
Ready to Practice?
Want more? Try Pro — Go Pro for 3650 ELO analysis, Position Reader & unlimited AI coaching