He was accused of frequently mocking authorities and politicians in his films, and of offending Islam and its symbols, including beards.
The case against him was brought by Asran Mansour, who is a lawyer with ties to Islamist groups.
Imam, who is 72 years old, has one month to appeal the decision.
He will remain out of jail until the appeal process has been completed, but has also been fined 1,000 Egyptian pounds (£105).
According to reports, Mr Mansour was offended by Imam’s film Morgan Ahmed Morgan, which sees a rich businessman stand for parliament, and the play Al-Zaeem (The Leader).
His case had languished in court for months, judicial sources told the Reuters news agency.
Nabil Abdel Fattah, an analyst at the al-Ahram Centre for Political and Strategic Studies in Cairo, said the sentence was likely to have been handed down because Imam had failed to appear in court.
He added that it would probably be overturned on appeal.
Imam’s movies regularly top the Egyptian box office and the types of roles he plays have varied enormously across his career.
Some of his movies have dealt with the rise of Islamic militancy and incompetent government officials.
The actor was awarded a lifetime achievement prize at the 2010 Doha film festival.