A policeman was wounded in the head when the crowd stoned the mosque in West Java province before setting it ablaze, said police spokesman Col. Dade Ahmad. Several suspects were taken in for questioning.
The attack was the latest targeting the Ahmadiyah sect in Indonesia, the world's most populous Muslim nation.
Most mainstream Muslims consider Ahmadiyah heretical because it does not consider Muhammad to be the final prophet. The sect was founded at the end of the 19th century in Pakistan.
Last week, a team of prosecutors, religious scholars and government officials said the sect "had deviated from Islamic principles" and recommended it be outlawed. There have been several acts of vandalism targeting Ahmadiyah since then.
About 300 people torched the mosque and destroyed an Islamic school building inside the Ahmadiyah compound in Sukabumi town just after midnight. Many sect members have since fled the area, seeking refuge with friends and relatives.
"We heard the attackers chanting 'Burn, burn' and 'Kill, kill,"' said Zaki Firdaus, one of the sect's members. "It was horrifying."
Around 200 people living on the mosque's compound got away before the crowd arrived. The police were called, "but the attackers came faster," Firdaus said.
Ahmadiyah followers have been persecuted for years, but last week's recommendation prompted an escalation, said sect spokesman Syamsir Ali. Four mosques have been destroyed since the April 16 announcement.
It was "like a poison, not a medicine for this nation," he said. "We don't know what will happen with us tomorrow."
Indonesia is a secular country with a long history of religious tolerance. But in recent years a hard-line fringe has grown louder and the government - which relies on the support of Islamic parties in Parliament - has been accused of caving in to it.
Ahmadiyah, believed to have 200,000 followers in Indonesia, has also faced persecution in other Muslim countries. Its followers insist it should be considered part of Islam.