Hillary Clinton may have lost the American election this month. But as Chinese voters went to the polls this week she popped up as a write-in candidate on paper ballots. So did Donald Trump, former Chinese leader Jiang Zemin and the Japanese porn star known as Sola Aoi.

“Hillary and Trump are famous in China--we know all about them,” said a student at Shanghai’s East China University of Political Science and Law. “We know more about them than we do about our candidates.”

Every five years, China holds elections that allow people to choose representatives to local People’s Congresses, with 2.5 million seats up for grabs. Voters ages 18 and above are eligible to participate in a series of staggered elections this year.

Voter enthusiasm, however, is muted. The party strictly controls candidates, harassing those who run without its approval. Some voters are also turned off by scandals, such as one this year in northeast Liaoning province, where dozens of lawmakers bribed their way into the national legislature.

Most residents sit out the exercise. Others find ways to subvert it.

Among those this week were the Shanghai student, who posted on social media a photo of his paper ballot. He ignored the other choices and instead wrote in Jiang Zemin. Mr. Jiang has become a popular figure in recent years, both a source of nostalgia and the object of millennial affection, given his quirky mannerisms and what some would describe as his comic, somewhat toad-like mien.

“I don’t understand who our candidates are,” the student said. “But I really like Jiang Zemin. Voting this way is a way of taking my vote seriously.”

On some college campuses in Shanghai, students say, ballots had to be recast in a second election because none of the candidates got 50% of the votes cast.

At the Shanghai University of International Business and Economics, a second election was hastily organized this week when an insufficient number of votes was cast for real candidates, one student said in an interview. “Most students did vote for one of the two candidates,” she said, including herself. “But some just voted in a disorderly fashion, like for Hillary or for Trump. ...Others voted for ‘Braised Chicken’ or ‘the Calabash Babies,’” a reference to a popular 1980s cartoon.

China has seen its share of serious write-in candidates in the past. They have included independent, non-party-approved candidates such as Qiao Mu, a Beijing Foreign Studies University scholar who unsuccessfully ran as an independent write-in candidate in 2011 despite official attempts to suppress his campaign.

However, he noted that this year didn’t seem to produce the same number of intellectuals running as independent candidates as in years past. “Mostly because people are too scared. In the past three years, they’ve arrested so many people, lawyers, netizens, journalists,” he said.

Mr. Qiao said he was demoted in 2014 from his former role teaching journalism and consigned to a clerical job at the school’s library. This year, he said, two months before the election he was warned against participating in any campaigns.

While protest write-in ballots have been cast in previous years, the advent of social media has made this year’s vote particularly fertile territory for such mischief, Mr. Qiao said. His university was among those required to rehost a vote this week due to an insufficient number of votes for candidates, he said.

“If your vote doesn’t have any meaning, then why not just pick something that’s funny, or just pick in a satirical fashion?” said Li Fan, director of research center The World and China Institute.

“In the past, it was the Monkey King, or Zhu Bajie,” he said, citing two mythological figures from the Chinese novel “Journey to the West.”

“This year, I hear a lot of people voted for Trump.”

--Te-Ping Chen. Follow her on Twitter @tepingchen.