What is the palace in xiangqi?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws for movement, checkmate and both repetition rulings: a side that forces a repetition by perpetual check or perpetual chase loses rather than drawing. The chase half has not been validated against the official casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it before publishing.
Direct answer
The palace (九宮) is the 3×3 box of nine points at each end of the board, marked with an X. The general and both advisors may never leave it. Because the general is confined for the whole game, you always know exactly where the target is — which is the single biggest structural difference from chess.
What the diagonals mean
The drawn diagonals show the advisor's moves, which are one point diagonally. The general does not use them: it moves one point orthogonally only, along the straight lines.
So an advisor reaches five of the nine points (the four corners and the centre) and the general reaches all nine.
Why it changes how you attack
There is no castling and nowhere to run. An attack is therefore a counting exercise rather than a vague build-up: you are covering specific points out of nine, and you can literally count whether you have enough attackers.
It also means the defender's own advisors can block the general's escape squares, which is exactly how several standard mates work.
Related questions
Can any other piece enter the palace?
Some can. Chariots, horses and cannons of either side may move through it and stand in it, and so may enemy soldiers once they arrive; your own elephant can stand on its front-centre point. Enemy advisors and elephants never can, because they never leave their own half.
Can a horse enter the palace?
Yes, freely, subject only to its usual blocked-leg rule.