There will be fire throughout this battle, meaning your health will be lower than normal. Defeat the first officer in the way, then follow the only path you can go. When you get into the long hallway, you will find some arbalests, which can be destroyed, so make sure you do that. Some more will be in the next hallway, so take care of them as well as any other officers.
The next area will have dragon statues, which will trigger its fire-breathing powers when you get close. One hit can destroy them, so go around to each one and smack it to get rid of them. Once you destroy them all, the gate to the next area will open, where a bunch of unit commanders will appear. Defeat them all to open up the next gate.
This area will have some ballistas, which definitely can do some damage, so either take out the officer controlling them, or go around and destroy all of them. The next room has a wind trap, which will blow you off the path and into the water below. A horse should be able to quickly traverse the path to reach the unit commander, which must be defeated to open the gate.
In the next room, simply defeat the officer guarding the door to open it, where you'll be greeted with a cutscene. After it's over, take out all of the officers in the area, then head to the southwest corner. There are three garrisons in the southwest corner of the map, with each one containing a hidden ambush should you happen to step inside them. There are reinforcements that are on the way and it's your job to get rid of all three hidden ambushes in the garrisons before they arrive.
If you do the above, then Zhang Xiu will appear inside of the castle, as well as a bunch of other officers. Take out the ones near the garrisons, and some other ones will likely come to your position. Once you clear the area, start heading to the main area in the northwest, which is where Jia Xu is located. Defeating both Zhang Xiu and Jia Xu will result in a victory.
There are three stars from this battle and it is best to play as Dian Wei. Not far into the battle, a fire attack will occur that will severely limit the health of Cao Ang and Cao Anmin. If you fail to save them, then the Battle of Xiapi will unlock. However, if you would like to save them, then you will need to be very quick in getting to them and defeating the officers that are harassing them.
Playing as Dian Wei seems to make it much easier for him to survive the battle, although it's not entirely clear the path to follow. It seems that rescuing Cao Ang and Cao Anmin might be a prerequisite. Once you make it outside the castle, fulfill all of the missions given, making sure you try and defeat everyone yourself.