The ad, widely mocked on social media, was later removed.
“Love for the country and the party starts from sperm,” one user sarcastically wrote on Weibo, a microblogging site.
Several commenters questioned the basis for the criteria. The ad also said that donors needed to be law-abiding, “honest and upright” and free of “political issues.”
“Where is the scientific proof?” another Weibo user wrote.
A staff member at the Peking University Third Hospital, reached by telephone, declined to comment.
Mr. Xi’s demands for unflinching party loyalty have been known to encourage overzealous action from officials eager to prove their devotion. Critics have said Mr. Xi is encouraging the return of a personality cult unseen since the days of Mao Zedong.
Under Mr. Xi, government officials have also spoken frequently about the need to instill the so-called “red gene” in younger generations, a reference to carrying on the Communist tradition.
William A. Callahan, a professor of international relations at the London School of Economics, said the ad reflected Mr. Xi’s efforts to blend science with ideology.
“Nationalism and socialism are mixing in peculiar ways to promote Chinese identity as a bloodline race,” he said. “The sperm bank announcement shows how the party increasingly dominates Chinese politics, and how nationalism increasingly is defined according to racial purity.”
The ad comes at a time when Chinese sperm banks are facing pressure to attract donors, as more families seek to have a second child following the relaxation of the one-child policy. The country faces intense pressure to grow its labor force as its society ages, and some sperm banks have resorted to using patriotic calls to persuade young men to donate.
Some were skeptical of the ad’s significance, noting that it appeared to be an isolated case.
Hu Xijin, the editor of Global Times, a staunchly nationalistic mainland newspaper, said the ad was “ridiculous” and seemed aimed at stirring up critical news reports.
“Leaders of this kind of organization who made this kind of accident should be asked to take responsibility and be given punishment,” Mr. Hu wrote in a Weibo post.