How does the king move in chess?

The king moves one square in any direction: forwards, backwards, sideways or diagonally. It can never move to a square attacked by an enemy piece, and it can capture an enemy piece only if that piece is not defended. The only time the king moves two squares is when castling. The whole game is about the king: checkmate it and you win.

VueChess team · updated December 2, 2026

How the king moves

In the middle of the board the king has up to 8 squares around it. On the edge it has 5, and in a corner only 3. It captures the same way it moves: by stepping onto the square of an enemy piece.

In notation the king is K. Ke2 means the king goes to e2, Kxf7 means it captures on f7. At the start of the game the white king stands on e1 and the black king on e8.

The king on e4 can go to any of the eight squares around it.

Where the king can't go

The king can't step onto a square attacked by an enemy piece, because that would put it in check. For the same reason the two kings can never stand next to each other: each would be attacking the other. There must always be at least one square between them.

In the diagram the black king takes away d5, e5 and f5, and the black rook covers the whole third rank. Of its eight squares the white king can use only two. To get used to these limits, play the computer on level 1.

The fifth rank is taken by the black king and the third by the rook, so only d4 and f4 are left.

Check, checkmate and stalemate

The king is never captured. When it is attacked, that's check, and you must deal with it right away: move the king, capture the attacking piece or put something in between. If none of this is possible, it's checkmate and the game is over. The details are in check and checkmate.

There's also the opposite situation. If your king is not in check but you have no legal move with any piece, that's stalemate, and the game is a draw. See stalemate and other draws.

Castling: the king's special move

Once per game the king can castle: it moves two squares towards a rook, and the rook jumps over it to the square next to it. On the kingside the white king goes from e1 to g1 and the rook from h1 to f1. On the queenside the king goes to c1 and the rook to d1.

You can't castle if the king or that rook has already moved, if there are pieces between them, if the king is in check, or if it would pass through or land on an attacked square. All the conditions are in the article on castling.

The f1 and g1 squares are empty and not attacked, so White can castle kingside.

Keeping the king safe

In the opening and middlegame the king is a weakness, so it hides. Castle early, and after that try not to push the pawns in front of your king without a reason: each pawn move there opens lines for enemy pieces.

There's one exception. If all three pawns stay on their starting squares, the king may get mated on its own back rank by a rook or queen. Many players make one quiet pawn move like h3 (or h6 for Black) at a calm moment, so the king has an escape square.

Rd1# is mate on the back rank: White's own pawns take away the king's escape squares.

The king in the endgame

Once the queens and most pieces are off the board, mating attacks are no longer a real danger, and the king turns into a fighting piece. It goes to the centre, attacks pawns and escorts its own pawns to promotion. In a pawn endgame, the side whose king gets to the centre first often wins.

A key idea here is the opposition. When the kings stand face to face with one square between them, neither can step forward, and the side that has to move must give way. In the diagram Black is to move: after 1...Kd8 the white king goes to f7, after 1...Kf8 to d7, and the pawn walks to e8 and becomes a queen.

In a queen or rook ending against a bare king, bring your own king up to cover the escape squares. See basic checkmates. To revisit an ending from one of your games, replay its moves on the analysis board.

Black to move has to step aside, and White's king clears the way for the pawn.

Questions

Can the king capture pieces in chess?

Yes, if the enemy piece is next to it and not defended. Capturing a defended piece would put the king in check, which is illegal.

Can two kings be next to each other?

No. Each king would be attacking the other, so there is always at least one square between them.

Can the king move two squares?

Only when castling. Otherwise the king always moves exactly one square.

Can the king be captured?

No. When the king is attacked and has no way out, it's checkmate and the game ends before any capture.

What happens if the king can't move but isn't in check?

If you have other pieces that can move, you move one of them. If no move is legal at all, it's stalemate and the game is drawn.