Can your own piece ever put you in check 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. Only an enemy piece can attack your general, so nothing of your own ever checks you directly. What your own pieces can do is uncover a check that was already latent: moving a piece out of the way of an enemy chariot or cannon aimed at your general is a discovered check against yourself, but the piece giving it is still the opponent's. Stepping onto an enemy cannon's line as its only screen exposes you the same way.
Discovered self-checks
The commonest version: you move a piece that happened to be blocking an enemy cannon's line to your own general, not realising the piece was doing double duty. The move is simply illegal, you cannot make it, whatever else it accomplishes, because it would leave your own general in check.
Why this matters before every move
Before moving a piece that sits between your general and any enemy chariot or cannon on the same line, check what is behind it. The move is not just inadvisable in that case, it is refused outright, so it is worth catching in your head before you try it.
Related questions
Is this the same as a pin?
Yes, a piece whose only job is blocking that line is pinned, and every move that takes it off the line is illegal for exactly this reason.
Can this happen with a horse's discovered attack too?
Yes, if the horse was standing on a line an enemy chariot or cannon needed blocked, moving it away has the identical effect.