The official said a "schoolboy from the northern Sugd region operating under the pseudonym Hidoyatullo" had attracted a 1,000-strong following on the Russian social network, Odnoklassniki.
The official did not name the schoolboy, citing his status as a minor, but confirmed the length of the sentence, which was handed down on Wednesday.
In December, a Tajik court sentenced seven people, three of whom were minors, to terms between seven and 27 years in jail for raising the Islamic State group's flag in the south of the country.
US targets Islamic State in Libya air strikes
The government has said up to 1,000 nationals, including the former chief of the interior ministry's special forces unit, have left the country to join the extremist group fighting in Iraq and Syria.
The secular Central Asian country has witnessed a heavy state crackdown on Islam recently, with widespread reports of forced beard shavings and bans on the sale of Islamic clothing in specific cities.
Social media users in the Central Asian state moreover complain of regularly losing access to Russian social networks, as well as Facebook and YouTube.
The government has denied authorising the blocks but consistently highlights social media's purported role in spreading extremist ideas.
Tajikistan's foreign minister Sirodjidin Aslov was in Washington Wednesday to meet US Secretary of State John Kerry and the foreign ministers of four other Central Asian republics.
The meeting was the second of its kind in the so-called "C5+1" framework that Washington is using to promote cooperation with the economically depressed region bordering Afghanistan.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ