Is a discovered check legal 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
Yes, and it is one of the most common ways check is given. Nothing forbids moving one piece so that a different piece behind it now attacks the general. It is legal whether the moved piece itself does anything or not, and it is especially sharp with cannons, where moving a piece onto or off a line can create a threat that did not exist a moment before.
The cannon version is the distinctive one
Because a cannon needs exactly one screen to threaten anything, moving a piece onto an empty line between your cannon and the enemy general creates a check out of nothing, with no chess equivalent at all. Conversely, moving the screen away switches an existing check off. Both are ordinary, legal discovered checks.
The horse and chariot version
A horse stepping aside to reveal a chariot's line, or a chariot sliding off a file to reveal a cannon behind it, works the same familiar way chess players already know, just inside a smaller and more countable palace.
Related questions
Is a discovered double check different from an ordinary discovered check?
Yes, if the moved piece also attacks the general, it becomes a double check, which only the general moving can answer.
Can you defend against a discovered check in advance?
Mostly by watching which of your opponent's pieces sit on a line between one of their own pieces and your general, and treating that line as a live threat even while it looks empty of danger.