Dax J, who left Tunisia after last weekend's set in the northeastern town of Hammamet, was sentenced to "six months for public indecency and six months for offending public morality", said Ylyes Miladi, a spokesman of a court in the nearby town of Grombalia.
The court dismissed charges against the nightclub owner and an organiser behind the event in the coastal resort, but the prosecution has appealed saying the two should have checked what the DJ would be playing, he added.
On Monday, authorities announced they had closed the nightclub.
The DJ has issued an apology, as have the organisers of the event.
Tunisia's religious affairs ministry has said: "Mocking the opinions and religious principles of Tunisians is absolutely unacceptable.