The official website for The Settlers of Catan

Question about “Traders & Barbarians” Expansion Barbarian Attack - Do you leave the remaining knights at their current hexes or move them back to the castle hex?

Answer

The knights remain at their current hex. Furthermore, they may immediately intervene in the next battle if there are more knights than barbarians at an adjacent hex.