El Mortada Iamrachen, a 31-year-old member of a protest movement in Morocco's neglected northern Rif region, was convicted in November of "defending terrorism" and incitement.
A court is expected to hear his appeal on Wednesday.
New York-based HRW said Iamrachen's conviction was based on a "possibly coerced confession".
"Once again, a Moroccan activist is thrown in prison after his contested confession is used to convict him," said the group's Middle East and North Africa director Sarah Leah Whitson.
Also Read
HRW said Iamrachen was accused of praising and inciting acts of terrorism in Facebook posts about news including the assassination of Russia's ambassador in Turkey in December 2016.
In another post, the activist wrote of telling a journalist that Al-Qaeda leader Ayman al-Zawahiri had ordered him to import weapons into the Rif region, but he said in court that the post was sarcastic, according to HRW.
The court rejected his claim that his confession had been coerced by police who threatened to publish private pictures of his wife that were found on his laptop, the rights group said.
More than 400 people have been detained since May, including the protest movement's leader, and dozens sentenced to prison over the unrest.
Disclaimer: No Business Standard Journalist was involved in creation of this content