This is what you have to do:
"In the Battle of Tian Shui defeat all the generals outside of the
fortresses. When Jiang Wei comes out of his fortress defeat both of his sub
generals. When Zhuge Liang reaches Jiang Wei move near them. Jiang Wei will
surrender in a cut scene. After the battle Jiang Wei will be unlocked."