The Alexandria criminal court reached its verdict in a hearing on Friday, the official said.
The activists were arrested as part of a crackdown against the Islamist opposition group that has seen at least 1,000 of its supporters detained in the past two months and more than a dozen candidates disqualified.
The 12 were found guilty of taking part in demonstrations and campaigning for the Brotherhood with leaflets that contained religious slogans, the official said.
Religious parties are prohibited in Egypt and candidates for Sunday's election are not allowed to use religious slogans in their campaigns.
The ban on religious slogans is thought to have been aimed at the Brotherhood's motto: "Islam is the solution."
Others running in the election, including some of the ruling National Democratic Party's roughly 800 candidates, have used quotes from the Koran or Islamic phrases on their posters.
Analysts expect the NDP to tighten its grip on parliament in Sunday's vote, further weakening the Brotherhood, which has 130 candidates for 508 seats left in the race.
Rights groups say the election has already been compromised by the arrests of opposition supporters and restrictions on their candidates. The government has pledged that the vote will be fair.
The Muslim Brotherhood controls a fifth of Egypt's outgoing parliament.