How do you checkmate in xiangqi?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.
Direct answer
Attack the general while every point it could move to is covered and the checking piece can be neither captured nor blocked. Because the palace is only nine points — several of them occupied by the defender's own pieces — two attacking pieces are usually enough, which is why mating patterns here are so much shorter than in chess.
The shape every mate shares
One piece attacks the general; the other covers the escape points. That is the whole structure, and it is why the named mates come in pairs of pieces: 馬後炮 (horse and cannon), 重炮 (two cannons), 雙車錯 (two chariots).
If you have one attacker, you do not have an attack — the defender answers with one piece and nothing has happened.
Do not forget your own general
In simplified positions your general covers the file it stands on. That is frequently the second "attacker" that turns a check into a mate, and it is free.
Related questions
What is the minimum material to mate?
A single chariot, with your general's help. A lone horse or lone cannon cannot. See basic checkmates.
Is stalemate also a win?
Yes. A player with no legal move loses, so smothering counts as a win too.