Piece Movement

How the King Moves in Chess

The king moves one square in any direction but never into check. Learn how it captures, how castling works, and which king moves are illegal.

On this page
  1. The short answer
  2. One square in any direction
  3. The king cannot move into check
  4. Capturing with the king
  5. Castling: the king’s special move
  6. Illegal king moves
  7. The king in the endgame
  8. FAQ

The short answer

The king moves one square in any direction: forward, backward, sideways or diagonally. It can capture an enemy piece on any adjacent square, provided the square is not protected by another enemy piece. The king may never move to a square where it would be in check.

One square in any direction

From a square in the middle of the board, the king has eight possible destination squares, the ones surrounding it. Near an edge or corner it has fewer. The king cannot move to a square occupied by one of its own pieces.

The king is not a long-range piece. If you are looking for the piece that moves any number of squares in all directions, that is the queen; compare them in the piece that can move in any direction.

The king cannot move into check

A king is in check when an enemy piece attacks the square it stands on. The rules say you may never make a move that leaves your own king in check, and that includes moving the king itself onto an attacked square. So it is not possible to “put yourself in check” in a legal game.

Squares can be attacked even if no piece could currently capture there. For example, a square covered by a rook along an open file is off limits to the king, even though it is empty.

Capturing with the king

The king captures like any other piece, by moving onto an enemy piece’s square. The restriction is that the captured piece must be undefended, because after capturing, the king would otherwise stand on an attacked square. Capturing a defended piece with the king is illegal.

Another point of confusion is the king and the opposing king. The two kings can never stand on adjacent squares; see can the king capture the king.

Castling: the king’s special move

Castling is the only time the king moves two squares. The king moves two squares toward a rook, and the rook moves to the square the king crossed. You may castle only if:

  • neither the king nor that rook has previously moved;
  • all squares between them are empty;
  • the king is not currently in check;
  • the king does not pass through or land on an attacked square.

Castling kingside (short) uses the rook on the h-file; castling queenside (long) uses the rook on the a-file. It is often used to tuck the king away and bring the rook into play. Castling is written O-O and O-O-O in algebraic notation, and basic chess strategy for beginners explains why it matters.

Illegal king moves

Common examples of illegal king moves:

  • moving onto a square attacked by an enemy piece, including by a pawn diagonally;
  • moving adjacent to the enemy king;
  • capturing a protected piece;
  • castling out of, through or into check, or after the king or rook has moved;
  • moving two squares other than when castling.

In casual play an illegal move is generally taken back. Tournament rules on penalties differ depending on the organizer, so check the rules of the event you play in.

The king in the endgame

In the opening and middlegame the king usually hides behind pawns. In the endgame, with fewer pieces on the board, the king often becomes an active fighting piece, helping to support pawns and attack enemy ones (the chess strategy guide covers endgame principles).

FAQ

Can the king move two squares? Only when castling.

Can the king move backward? Yes, the king can move in any direction. See which pieces can move backwards.

Is the king the most powerful piece? It is the most important piece, but it is not the most powerful in terms of range. For an overview of all the pieces, see chess pieces: names and how each moves.

The complete guide to piece movement

Chess Pieces: Names and How Each Moves
Read the guide

Keep exploring

Guides from other topics

All topics →

Advanced Chess Openings

What makes a chess opening advanced? Explore complex systems like the Najdorf and Ruy Lopez, d4 setups, repertoire building, move orders and how to study theory.

Chess Openings 4 min read