BEIJING — The Chinese Communist Party said on Monday that Sun Zhengcai, a high-flying politician who had been seen as a potential future premier, was under investigation over suspected “grave violations of discipline,” ending his career and raising the stakes of a national leadership shake-up that is just months away.

Mr. Sun, 53, is the most senior serving politician purged so far in a five-year drive against corruption, disloyalty and abuse of power that President Xi Jinping began soon after taking control of the Communist Party in late 2012. The terse party announcement about the investigation issued through Xinhua, the state news agency, did not specify the allegations against Mr. Sun. “Violations of discipline” is a vague term that can include corruption, abuses of power and disloyalty to the party.

But by removing Mr. Sun, Mr. Xi has eliminated a potential obstacle to his efforts to consolidate power later this year, when a Communist Party congress will appoint a new leadership team to serve under him for his second five-year stint as party leader and as president.

Mr. Sun had been party secretary of Chongqing, a riverside city in southwestern China, since late 2012, when he was sent there to help clean up a previous political scandal. His abrupt dismissal was announced on July 15, initially without explanation. Since then, he has not appeared in public, and his name had not appeared in state media until the official confirmation on Monday that he was under investigation.