MOSCOW—Russian rock icon Andrei Makarevich was working the crowd between songs at the House of Music one evening last month when five rough-looking men hurled fruit at him, sprayed pepper gas and yelled: “Makarevich is a traitor to the motherland!”

The incident capped the 60-year-old’s unintended transformation from the frontman of one of the foremost Soviet rock bands loved by millions of Russians to a blacklisted dissident. The tipping point: playing a concert for refugees in a town controlled by Ukrainian government troops.

...