Diplomats returning from overseas postings don't usually receive special attention at China's Ministry of Foreign Affairs, a vast government bureaucracy with thousands of staff.

But when Zhao Lijian, a diplomat known for his pugnacious social media presence, finished a posting in Pakistan in August, he received an enthusiastic welcome in Beijing. A group of young admirers at the ministry gathered at his office to cheer his return, according to two people familiar with the matter.

That admiration was fueled in part by a Twitter spat he had engaged in a month earlier with Susan Rice, the national security adviser to former U.S. President Barack Obama. Each accused the other of being "ignorant" and a "disgrace".