The four were beaten to death west of Cairo, when a crowd of angry villagers, including ultraconservative Salafis, surrounded the house of Shiite community leader Hassan Shehata, threatening to set it on fire if 34 Shiites inside did not leave the village before the end of the day, according to security officials.
When they refused, villagers attacked them, dragged them along the ground, and partially burned the house, the officials said.
Shiites are a minority in Egypt, which is largely Sunni. Christians make up about 10 percent of the population.
The attack came just days before Islamist President Mohammed Morsi was ousted from power by the military.