A legal chess move follows the piece’s movement rules, respects occupancy and special-move conditions, and leaves the own king unattacked. A geometrically valid move can still be illegal because of check, a pin, castling restrictions or an en passant line opening.
- Piece geometry is only the first legality test.
- Evaluate the complete board after the move.
- Formal illegal-move penalties depend on the event rules.
Use a three-layer legality test
First check movement: does the piece travel in its permitted pattern, with a clear path if it is a sliding piece? Second check occupancy: does it avoid landing on a friendly piece and make any capture correctly? Third check king safety after the complete move.
This order catches most beginner errors. A rook moving diagonally fails the first test. A knight landing on a friendly pawn fails the second. A bishop leaving a line that exposes its own king fails the third even though its diagonal is clear.
Special moves add their own conditions. Castling depends on history and attacked squares; en passant depends on the previous move; promotion requires a replacement choice. Do not treat them as ordinary movement with a decorative animation.
You must answer check immediately
When your king is attacked, an unrelated move is illegal even if it creates a major threat. You must move the king, capture the checker or block a sliding attack when possible. The response must remove every current attack on the king.
If the king is in check from a knight, there is no intermediate square to block. If two pieces give check, the king must move. When no legal response exists, the game is checkmate and there is no next move to make.
Do not rely on whether the opponent says “check.” The legality comes from the position. In a physical game, both players should observe the board; in a formal dispute, use the arbiter rather than trying to capture the king.
Pinned pieces and exposed lines
An absolute pin occurs when moving a piece would expose its own king to attack. The pinned piece cannot make that exposing move. It may still be able to move along the line or capture the attacker if the resulting king position is safe.
A relative pin against a queen or rook is different. Moving the front piece can be legal but lose material. This distinction is important: “illegal” means forbidden by the rules, not merely a bad chess decision.
Check the entire line after a capture. Removing an enemy blocker or moving your own defender can reveal a bishop, rook or queen behind it. The legal destination depends on the resulting position, not just what was attacked before the move.
King moves and attacked squares
A king cannot move onto a square attacked by an enemy piece. Inspect pawns diagonally, knight jumps and sliding lines. The opposing king also attacks adjacent squares, which prevents the kings from becoming neighbours.
An enemy piece can count as attacking a king destination even when it is pinned to its own king. Do not assume the destination is safe because that piece could not freely make an ordinary move. King-safety attack rules preserve this restriction.
When the king captures, remove the captured piece in your mental board before checking the destination. It may have been blocking a second attacker. A capture that looks safe before the removal can be illegal afterward.
Special-move legality
Castling is illegal if the king has moved, the chosen rook has moved, the path is blocked or the king starts in, crosses or lands in attack. An attacked rook alone does not make it illegal. Queenside castling also requires the b-file square between rook and king to be empty.
En passant is available only immediately after the relevant two-square pawn advance. Its removal of the captured pawn can open a line to the own king, making the capture illegal. Promotion must replace the pawn with a queen, rook, bishop or knight on the same move.
For each special move, check the complete final board and the additional history. A screenshot of piece placement alone cannot always establish whether castling or en passant is available.
What to do after an illegal move
In a friendly teaching game, agree on a clear correction procedure before playing. In a formal event, pause and ask the arbiter to apply the applicable rules. Do not invent a universal penalty: the handling differs with format, supervision and whether the opponent has already moved.
Touch-move rules are also distinct from geometric legality. In over-the-board play, intentionally touching a piece can constrain which legal move you must make. Online interfaces handle input differently, so a rejected drag is not a complete guide to tournament procedure.
The linked FIDE Laws are the primary reference for standard over-the-board rules. Event regulations and online-platform rules may add relevant procedures. Keep rules instruction separate from an interface’s convenience features.
A legality exercise you can repeat
Take a game position and propose one natural developing move. Check its path, destination and effect on the king. Then inspect a tempting capture and perform the same test after removing the captured piece. Finally ask whether a special move is available and which history it requires.
Explain why an illegal move fails rather than merely noting that the board rejected it. This makes the lesson transferable to a physical board and to unfamiliar interfaces.
Use king movement, castling and en passant for the common exceptions. Legal-move awareness is the foundation on which tactical and opening decisions are built.
Reader questions
Is a bad move the same as an illegal move?
No. A legal move may lose a queen, weaken the king or enter a lost ending. Illegal means it violates movement, occupancy, king-safety or special-move rules. Keep the distinction clear when analysing: strategic judgment cannot make a rule-breaking move permissible.
Does the online board rejecting a move teach the whole rule?
It tells you that the interface did not accept the action, but the reason may involve a pin, check, special rights or input handling. Reconstruct the resulting board and identify the rule. Formal over-the-board procedures, including touch-move and penalties, need separate understanding.
Sources and example notes
Original, AI-assisted instructional draft. References support the relevant rules, opening entry positions or tool descriptions. The exercises are editorial suggestions, not measured claims about results.
No engine evaluation, measured popularity or founder approval is claimed. Read our editorial approach.
Give your preparation
a direction.
ChessOak is being built to connect your games, your playing style and the openings you learn.
Join the waitlist Get occasional ChessOak beta and launch updates by email.In development · Join the ChessOak waitlist