China's Asian Cup hopes were hanging by a thread on Monday after a 1-0 loss to already qualified hosts and holders Qatar meant they finished third in Group A on two points.
Tajikistan beat Lebanon 2-1 in Group A's other game to leapfrog China into second place and reach the last 16.
Hassan Al-Haydos's 66th-minute wonder goal gave Qatar a perfect three wins from three in Doha.