Germany has granted asylum to two Hong Kong pro-democracy protesters, a sign of waning international confidence in the city’s political freedoms and justice system.

Ray Wong Toi Yeung fled to Germany in November 2017, ahead of his trial in Hong Kong on charges of inciting to riot and illegal assembly in connection with chaotic protests in the city’s Mong Kok district in 2016. Another alleged rioter who stayed in Hong Kong drew a six-year prison sentence.

Some...