The fresh-faced Ning, a fan favourite in China after winning the world championship crown in 2015, clocked 49.67 seconds this week in his 100m free heat in a trial for the Chinese National Games, his first competitive race since last year's Olympics, Xinhua news agency said.
However the 24-year-old – hugely popular in China for his good looks as well as his success in the pool – then quit the final, citing a waist injury.
"Ning's result didn't beat the designated A cut time. He is not the top-ranked swimmer among those who meet the B cut, so he is not eligible to compete at the world championships," Xinhua quoted Zhao Jian, vice director of the Chinese Swimming Association, as saying.