Castling is a special move where your king and one rook move at the same time — the only move in chess where two of your own pieces move at once. The king slides two squares toward a rook, and that rook hops over to the square right beside it. In one move you tuck the king behind a wall of pawns and bring a lazy rook into the game.
There are two versions:
- Kingside (short) castling, written O-O — with the rook nearest the king. Quick and common.
- Queenside (long) castling, written O-O-O — with the far rook. It takes an extra square to clear but plants the rook aggressively.
Castling is only legal when all of these are true: neither the king nor that rook has moved yet, there are no pieces between them, the king isn’t currently in check, and the king doesn’t pass through or land on a square that’s under attack.
In the diagram White has done the prep work: developed the bishop and knight to open the path, and nothing is in the way. Playing O-O drops the king to g1 and swings the rook to f1 — safe king, active rook, all in a single move. That’s why “castle early” is one of the first pieces of advice every beginner hears.
Related terms
- Go deeper: how to castle — a step-by-step walkthrough
- King safety — why you castle in the first place
- Development — castling is part of getting your pieces active
- Open file — where your newly freed rook wants to be
- Back to the chess glossary
Frequently asked questions
Can you castle through or out of check? No on both. You can’t castle while in check, and the king can’t pass through a square that’s attacked. You can castle later once the check is dealt with.
Can you castle if the rook is under attack? Yes. The restriction is only about the king’s squares — an attacked rook (or the square it passes over) doesn’t stop you.
Is kingside or queenside better? Neither is “better” — kingside is safer and faster, queenside is more aggressive. It depends on the position.
Written and fact-checked by the Chess Lab Academy Editorial Team (AI-assisted, human-edited) · Rule verified against the FIDE Laws of Chess (Article 3.8) and Wikipedia; diagram checked with python-chess · Last verified 2026-07-13 · How we verify content.