To begin, defeat the officers right outside your starting position, then start heading to the southwest base. Defeat the officer there to capture it, then head east towards the next one. Do the same here as the previous one, then once more in the southeast one (you can only enter from the west gate).
Once you take care of those three bases, the enemy will attempt to send out messengers to their main unit. Head to the southwest corner of the castle and intercept the messengers, of which there are a couple. There is a ladder nearby that you can use to breach the castle, so hop down and inside.
At the top, defeat the officers to open the gate, as well as stop the arrow attacks. Once the way is open, drop down into the main area and clear the area there of all the officers to begin your chase to Xiahou Ba, who should now be attempting to escape from the back of the castle.
Of course, there will be officers between you and the back gate, so take them down and continue your pursuit, which likely has ended thanks to Deng Ai ambushing Xiahou Ba. All you have to do now is defeat him in combat to finish the level.