Pakistan began the contest with intensity, taking an early lead in the 11th minute when forward Hassan Shahbaz scored a well-placed field goal.
Despite a flurry of penalty corners awarded during the second quarter—two to each side—neither team managed to alter the score before the interval.
The breakthrough came again for Pakistan late in the third quarter. Ali Hanzala added a second goal, also from open play, giving the visitors breathing room.
However, China responded immediately, with Jiaxing Lin converting a penalty corner in the same minute to reduce the deficit to 2-1.
With the home crowd urging them on, China pushed hard for an equaliser in the final period.
Pakistan’s goalkeeper Ghulam Mustafa produced a series of vital saves to preserve the lead, ensuring his team remained unbeaten in the group stage.
The result left Pakistan at the top of Group A, having collected 12 points with a goal difference of +21.
Over the course of their campaign, they scored 25 goals and conceded just four.
Earlier in the tournament, Pakistan opened with an 8-0 win over Hong Kong, followed by a 9-0 rout of Sri Lanka.
Their third outing saw them overcome Bangladesh 6-3, which all but sealed their passage to the knockout stage.
Pakistan will now meet Malaysia in the semi-final at the same venue on July 11.