Is capturing mandatory 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

No. Xiangqi has no forced-capture rule of any kind. If taking a piece is not the move you want, you may ignore it completely, exactly as in chess. The only thing that ever forces your hand is check, and even then capturing is just one of several legal answers.

Where this confusion comes from

Draughts and some regional board games require captures whenever one is available. Xiangqi does not work that way, and neither does chess. Players arriving from a mandatory-capture background sometimes hesitate over a free piece looking for the trick; usually there isn't one, and it is simply better to take it.

When declining a capture is correct

It is common and often right: taking a piece can open a line for the opponent, remove your own cannon's screen, or walk a piece into a pin. Evaluate every capture like any other move rather than assuming it must be played because it is available.

Related questions

Must I capture if it gets me out of check?

Only if it is one of your legal answers to that check, and only because it answers the check, not because capturing itself is compulsory.

Is there any xiangqi variant with mandatory capture?

Not in standard play under WXF or Chinese national rules.

Try it on a real board

Reading an answer is one thing; playing it is another. Free, instant, and nothing to install.