Can a cannon defend a piece 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, but only under the same condition it captures with: there must be exactly one piece between the cannon and the point it is defending. A cannon aimed at a friendly piece with a clear line in between is not defending it at all, because a clear line means no capture, and therefore no recapture either.
Why defenders miss this
The instinct is to see a cannon lined up behind a piece and assume it is protected, the way a chariot behind it would be. But the screen rule applies to defence exactly as it applies to attack, so an empty line between the cannon and the piece it appears to guard means no real protection at all.
Setting up real cannon defence
To actually defend a piece with a cannon, you need a second piece sitting between the cannon and the piece being defended, functioning as the screen for the recapture. That is a more demanding structure than a chariot's defence, and it is why cannons are usually poor choices for guarding a single square.
Related questions
Is a cannon-defended piece as safe as a chariot-defended one?
Only if the screen stays in place. Move the screen and the defence disappears, which is not a risk a chariot's protection carries.
Can a cannon defend the general?
Yes, on the same condition: exactly one piece between the cannon and the general's point, ready to recapture whatever takes it.