The suspect, Muhammad Hanif Ismail, pleaded guilty to two counts and was sentenced to two years' jail for each charge.
High Court judge A B Karim noted that "even though the offences only started with possession of terrorism-related material, they can lead to real terrorism, which does not need borders to happen".
Police also found several black and white stickers - suspected to be the logo of the dreaded ISIS - and a pen drive in his family home.
His parents confirmed that the material belonged to him.