Every player loves to attack. But every game also contains moments where you are the one under pressure, and many games are won by the player who defends well and counterattacks at the right moment. Defense in xiangqi has its own techniques because of the palace, the defenders and the unusual ways cannons and horses attack.
The foundation: a solid palace
The general's safety rests on four defenders: two advisors and two elephants. The healthiest structures have:
- one advisor in the center of the palace or both advisors on the back rank, able to reach the center,
- the elephants connected, able to protect each other,
- the center file in front of the general not cluttered with pinned pieces,
- the general on its starting point or one step to the side with a reason.
A palace with all four defenders connected can withstand a great deal. The most important defensive habit is simple: do not give defenders away cheaply, and do not move them without a purpose.
Defending against cannons
Cannon attacks are the most common danger in the middlegame. Because a cannon captures by jumping exactly one piece, the defenses are unusual:
- Add a piece to the line. Two pieces between a cannon and its target block it completely.
- Remove the screen. If only one piece stands between the cannon and your general or another valuable piece, moving that piece away can neutralize the threat — but check whether that creates a new screen elsewhere.
- Keep the center file under control. A central cannon is most dangerous when exactly one piece stands between it and your general. Know at all times how many pieces are on that file.
- Trade the cannon. In crowded positions, the enemy cannon is often their best attacker. Exchanging it for your horse can be a good defensive decision.
Defending against horses
Horse attacks are dangerous because checks from a horse cannot be blocked in the usual way. The unique defense is the leg:
- Block the horse's leg. A piece placed next to the horse in the direction it wants to jump stops that jump entirely. Advisors, elephants and soldiers are often perfectly placed to do this.
- Control the landing points. If the horse wants to reach a point next to your palace, make sure that point is covered by an advisor, elephant or chariot.
- Chase it early. A horse approaching your palace is easier to deal with before it arrives. A chariot or cannon attacking it may force it back.
Defending against chariots
- Keep the back rank and the second rank covered. Most chariot attacks happen along these lines.
- Block files with horses or cannons when an enemy chariot eyes an open file toward your palace.
- Offer a chariot trade. If the opponent's chariot is their key attacker, placing your chariot opposite it on the same file or rank can force a trade or retreat.
Trading as defense
Exchanges are one of the most powerful defensive tools:
- Trade the most dangerous attacker. One active enemy chariot or a well-placed horse is often the whole attack. Removing it ends the danger.
- Trade into an endgame you can hold. Some endgames with full defenders are very hard to win even for a side with extra material.
- Avoid trading your own key defenders. Giving up an advisor or elephant to relieve pressure often makes the next attack stronger.
When to counterattack
Pure defense usually loses eventually. Look for the moment to switch:
- When the attacker has overcommitted. If most of their pieces are on one wing, their palace or the other wing may be weak.
- When your defensive move also threatens. The best defensive moves do two things: stop a threat and create one.
- When their attack has run out of fuel. After a trade or two, the attacker may lack pieces to continue. That is the time to bring your pieces forward.
A defender who waits too long lets the attacker regroup. A defender who counterattacks too early leaves the palace open. The skill is timing.
Using the no-move rule in defense
Remember that in xiangqi a player with no legal move loses. In tight endgames and late middlegames, keep at least one spare move available — an advisor or elephant that can shuffle back and forth. Positions where the defender runs out of moves are lost even without checkmate.
An example in words
Black is attacking: a chariot on Red's second rank and a central cannon aimed at Red's general with two pieces between. Red's advisors are still in place, but one elephant is gone.
Red's defensive plan:
- Count the center file. Two pieces between the black cannon and the red general — safe for now, but neither piece should leave carelessly.
- Challenge the black chariot. Red places its own chariot on the same rank, offering a trade.
- Block the approaching horse. Black's horse is two jumps from Red's palace. Red moves an advisor to the point that blocks the horse's leg on its best route.
- Look for the counter. Black has sent both chariots to one side. Red's cannon and horse on the other side now have targets.
After the chariot trade, Black's attack loses its main piece, and Red's counterattack begins.
Common defensive mistakes
Moving defenders to "do something". Every advisor or elephant move weakens a point. Move them only with purpose.
Panic trades. Trading your best piece to stop a harmless-looking threat can lose the game later.
Ignoring the center file. Many defeats come from a piece leaving the center file and giving the enemy cannon a screen.
Pure passivity. Waiting without any counterplay gives the attacker unlimited time.
Practice
Against the computer on the home page, choose a slightly higher level and play Black, deliberately focusing on defense. After each game, count how many of your defenders you lost and whether each loss was necessary. Also study the patterns in attacking a wing from the defender's side.
Frequently asked questions
Is it bad to move advisors and elephants?
Not if there is a purpose. Moving them without a reason weakens the palace.
What is the best defense against a central cannon?
Keep two pieces between the cannon and your general, protect the center soldier with a horse, and avoid leaving a single piece on the file.
Should I always trade when under attack?
Often trading the most dangerous attacker is good, but not if it costs your own key defenders or leaves a losing endgame.
How do I know when to counterattack?
When the attacker has overcommitted, their attack has lost its main pieces, or your defensive move also creates a threat.