Can moving a piece for an unrelated reason accidentally deliver check via the flying-general rule?

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: that move is illegal for you. If your piece is the only thing standing between the two generals, you may not move it off that file, for a capture, a developing move or any other reason, because the generals would then face each other. That position can never be created, so it is never a check on your opponent; the move is simply refused. A chariot, cannon or soldier may still move along the file.

Why this is easy to miss

A player calculating a capture or a developing move is usually focused entirely on that move's own consequences, not on what else happens to be sitting on the file between the generals. A piece can spend the whole game there without ever being noticed as doing double duty, right up until the move you planned for it turns out to be illegal.

Turning it into a real weapon

Strong players use the rule the other way round. When an enemy piece is the only thing between the two generals, it is pinned to that file, and attacking a piece that cannot step away is a genuine source of tempo. A horse, elephant or advisor caught there cannot move at all.

Related questions

Does the piece have to be a major piece for this to apply?

No, any piece at all counts, right down to a lone soldier. Only its moves differ: a chariot, cannon or soldier may move along the file, while a horse, elephant or advisor cannot move at all.

Can it hurt the player whose piece is stuck there?

Yes. The piece cannot leave the file, so a plan that needed it elsewhere fails, and if it is attacked it may be unable to step aside.

Try it on a real board

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