Khan, 48, had already been suspended by the Tory Party and announced he would step down.
Khan, who was born in Wakefield, became the city's MP following the 2019 election, and was the first Tory in more than 89 years to take the so-called Labour safe seat, stopping Mary Creagh from being re-elected.
He won 21,283 votes and ended her 14 years as the city’s MP. Ms Creagh polled 17,925 votes.
Independent Stephen Whyte won 454 and the Brexit Party’s Peter Wiltshire won 2,725.
Labour had held the constituency since 1932.