Wan Khairul Hayyee Wali, 30, said he had no idea that he could not even wear shorts to play futsal.
He said he has been wearing shorts to play futsal for many years, ever since he was in school.
"Therefore it came as a shock to me when a religious department enforcement officer gave me a notice saying I have flouted the Syariah Criminal Enactment for exposing my knees," he said.
"Seriously, they can't expect me to wear a sarong to play futsal," added Wan Khairul, a general worker at a wholesale store.
Khairul was slapped with the notice at 10.45pm on Monday.
He was ordered to attend a counselling session next month, failing which he would be called to appear before the Syariah court where he risks being fined RM1,000 if found guilty.
Khairul had tried explaining to the officer that he was on his way to play futsal and that he had got down from his car for a short while to buy a burger for his wife.
"If I did not stop to buy a burger, I would never have known that it is an offence to wear shorts even when we are on the way to play sports," he said.
Khairul said he would attend the counselling session.
"If it is an offence, they have to make it clear to the public. How are we supposed to know that it is an offence because even football players wear shorts," he said.
A Kelantan Islamic Religious Affairs Department officer said the dress code was strictly applicable to Muslims only.
"We do not take action against non-Muslims. We do not even take action if a female non-Muslim wears shorts in public," said the officer.
The officer also said Wan Khairul would not have to pay any fines if he attended the counseling session.
"We just want Muslims to dress decently when in public spaces, in keeping with our religious teachings," said the officer.