The board
The board has 9 files and 10 ranks, but pieces sit on the intersections of the lines, not inside squares.
The palace is the 3 by 3 box on each player's back side. Generals and advisors must stay inside their own palace. The river divides the board in half. Elephants cannot cross it, and soldiers gain sideways movement after crossing it.
The pieces
A piece captures by landing on an enemy-occupied point, and no piece may move through an occupied point. The cannon's capturing jump is the only exception. The pieces are listed below in the traditional order.
General: moves one point horizontally or vertically and can never leave its own palace. The two generals may never face each other along an open file with nothing between them: a move that would expose that line is illegal. In effect, a general guards the file in front of it like a chariot.
Advisor: moves one point diagonally and, like the general, stays inside the palace.
Elephant: moves exactly two points diagonally and cannot cross the river, so it never leaves its own half. It does not jump: a piece on the midpoint of the diagonal, the elephant's eye, blocks the move.
Horse: moves one point orthogonally and then one point diagonally outward, like a chess knight, but it does not jump. If the orthogonal point it steps through, the horse's leg, is occupied, the horse cannot move in that direction.
Chariot: moves any distance horizontally or vertically and cannot jump, exactly like a rook. It is the strongest piece on the board.
Cannon: moves like a chariot when it is not capturing. To capture, it jumps over exactly one piece, friend or foe, called the screen, and lands on an enemy piece beyond it.
Soldier: moves one point straight forward and never backward. After crossing the river it may also move one point sideways. It never promotes.
Check, checkmate, and endings
A general is in check when an enemy piece attacks it, and the player in check must answer the threat. If there is no legal answer, it is checkmate and the checked player loses.
A player who has no legal move at all also loses. This is the opposite of Western chess, where having no legal move is a stalemate draw.
Xiangqi also restricts endless forcing cycles. Perpetual check and perpetual chase are not allowed: a player who repeats an endless attack loses rather than forcing a draw. Tournament rules spell out detailed repetition procedures for exactly when a cycle counts as perpetual.
A game is drawn when neither side has enough material to checkmate, by a repetition that breaks none of those rules, or when a long run of moves passes with no capture. The no-capture limit depends on the rule set: the World Xiangqi Federation rules use a fifty-move rule, while the Chinese (CXA) rules require at least sixty plies before a draw can be claimed.
A famous game
To see the pieces work together, step through the most famous trap in xiangqi. It comes from Juzhongmi (橘中秘), a manual printed in 1632. Red gives up a horse; when Black grabs it, Red's chariots and cannons pour through the gap and checkmate on the thirteenth move.
Play on Mistboard
Xiangqi is playable on Mistboard. Play against an engine or challenge a friend. No account required.