When Is It Illegal to Castle in Chess (Picture Guide)?

One of the early “accomplishment points” in chess is once you fully understand when you can, and can’t, castle with your king in chess. We were all pure beginners at some point, and learning the more intricate movements of chess, when you can use them, and when you can’t, is a major part of the learning process.

Especially for beginners.

Whether you’ve learned about chess as a parent to child bonding moments as parents taught you the game, or have caught the bug from the Netflix series Queen’s Gambit, castling is going to be one of the early “advanced” moves that you will need to learn and master as you learn this amazing game.

There are five times where a player can’t castle in chess which are: if the king has moved, if the king is in check, if the rook is moved, if the castle puts a king into check, or if any space the king moves through in a castle is under threat from an opponent’s piece. That last one is the most common missed reason when an illegal castle is allowed in a game.

So When Is it Illegal to Castle in Chess?

First, you will learn what a castle is. When the bishop and knight have been moved out of the back row (and even the queen if you castle on the long side), you can move the king and rook to a spot in the middle, placing the king behind a row of pawns with a rook on the outside as a sort of “guard.”

According to the rules laid out by the FIDE, there are five specific times when castling is not allowed. This is an all or nothing type scenario, if any of these five conditions have been met, then you can’t castle. It’s an illegal move when or after any of these conditions have been met.

King Has Already Moved

Put simply, if you have moved the king at any point in the game, castling is off the table. The castle action MUST be the first move that a king makes on the board.

So if your king already moved at some point whether by choice or to get out of a check, then castling is off the table for that game.

white king moved chessboard

As you can see from this picture the white king is on a white space. Since the queen always starts on her own color, that means the king has already moved.

As good as that castle looks, it is now an illegal move because the king has already moved before that point in the game.

Rook Has Already Moved

You can only castle with rooks that have not yet moved during the game. This means if you moved a rook, then moved it back to its original position on a subsequent move, you still can’t castle with the rook.

Like any king, the pieces involved in a castle must be moving for the first time.

rook already moved chess

The rook has already moved meaning on this side, at least, there is no option for castling even if in the next move the rook came back into its original starting position.

Your King Is in Check

You can’t castle out of check. This also breaks the “threatened space” rule that makes a castle illegal, but to make sure the point is clarified this is a listed rule.

If your king is threatened and in check then you need to resolve that situation without moving the king in order to be able to castle afterwards. Sometimes (particularly with those tricky knights) that’s not possible and the king must move, but you have to move it out of danger without castling.

king in check chess

As long as your king is under direct check, like in the picture above as the black queen has put the white king into check. Until that is resolved, castling is simply not a legal move.

Castling Puts Your King into Check

Moving your king into check is an illegal chess move, so that throws this out as an option. Aside from losing you the game even if it was allowed, it’s just a bad move! This also doubles up with another rule about when it’s illegal to castle: when any space in the castle is under threat.

So if the result of a castle is your king being threatened, the castle move isn’t allowed.

illegal castle scenario chess

Here castling would put the king into check, since the black queen can diagonally attack the spot where the king would move if white tried to castle here.

If Any Space in the Castle Space Is Under Threat

This is the least common situation that comes up with a potential illegal castle, but it’s also the one that slips by the most often when an illegal castle move in chess occurs. This was actually a rule that I didn’t know for a long time: I even knew the en passant rule in chess before learning about this particular rule.

space in castle is threatened chess

Here castling would put your rook at risk, but not your king. However, since that empty space is one the king and rook would pass through, it’s illegal to castle here.

Short Cheat List of When It’s Illegal to Castle in Chess

  • You have moved the king at any point
  • You moved the castling rook at any point
  • Your king is in check
  • Moving would put your king into check
  • Any space your king or rook would move through is threatened by an opponent’s piece

Castling in Chess FAQ

Q: Can I castle out of check to get my king to safety?

A: Nope. This is one of the most common mistakes beginning chess players make when they run into illegal castling. When a king is in check, you can’t castle. That’s one of the situations where castling isn’t allowed, so that would be an illegal castle. You need to take the piece, move the king (which takes away castling in the future) or block the attacking piece, assuming that’s possible.

Q: When is a good time to castle?

A: This will depend on a game by game basis. For early learners of the game of chess, if you get down the basic common moves and openings, and aren’t sure what to do next, the castle is a great defensive position and a good way to spend that turn as you see what your opponent is going to do and how she/he reacts.

Generally castling will be done in early to mid game in most games of chess where the move occurs. This is rarely viable late game.

Q: Can I move a rook back into place and then castle?

A: Nope. Once a rook moves that rook can’t be used to castle.

Q: So I can’t castle even if the king or rook aren’t threatened?

A: If this is referring to a space being under threat by an opponent’s piece, that is correct. There aren’t many scenarios where this comes up, but if an out of the way bishop or knight threatens a space these pieces are moving through, even if they don’t end up there, then you can’t castle. You need to take care of the opponent’s threatening piece, first.

Q: Can I castle to the queen’s side in chess?

A: Yes. While unusual for a variety of reasons, not the least of which is not bringing out your queen too early, as long as all other legal requirements for the move are met, you can castle to the queen’s side, if that’s your wish.

Q: Is castling the best defensive move in chess?

A: You really can’t make a declarative statement like this, especially with chess where so much relies on a game by game basis, but there’s no denying that choosing to castle is an incredibly strong defensive move and there’s a reason that it’s so popular.

Q: Do you have a chess board for beginners that you’d recommend?

A: Yes. This isn’t the one that I use, but I know the squares by memory because I’ve played chess long enough to be able to record the moves in the game. At that point any moderately nice and well built wooden chess set is a good pick.

For beginners though, I LOVE this one:

beginners chess board

The board lets you learn the spaces, record the movements, and really helps visualize what you need to learn to become a serious chess player and be able to begin to follow along with discussions of even more advanced chess players, or YouTube chess channels breaking down move options in a live match while pausing the video.

This is a good buy and it’s extremely reasonably priced (picture linked to Amazon).

You can check up to date pricing on Amazon HERE.

Castling in Chess, In Conclusion

While in the overwhelming majority of situations there will be no issue with wanting to castle in chess, now you know what the rules for castling are. Since you know what moves are legal and which ones are not, you now have the ability to add castling into your growing repertoire of chess moves.

Avoid those problem factors so you don’t have to worry about an illegal castle and you are all set to go!