Proteins belonging to the sigma factor family in eubacteria initiate transcription by associating with RNA polymerase. A subfamily, the extracytoplasmic function (ECF) sigma factors, which form a widely distributed bacterial signal transduction system comprising a sigma factor and a cognate membrane-embedded anti-sigma factor, regulates genes in response to stressors that threaten cell envelope integrity including the cell wall and membrane. The Gram-positive soil bacterium Bacillus subtilis provides a valuable model for investigation of the ECF sigma factors. This review focuses on the function and regulation of ECF sigma factors in B. subtilis, in which anti-sigma factors play a role in connecting an external stimulus with gene regulation. As representative examples, the regulon and regulatory mechanism of σW are closely associated with membrane-active stressors, whereas σM is strongly induced by conditions that impair peptidoglycan synthesis. These studies demonstrate that the mechanisms of ECF-dependent signaling are divergent and constitute a multi-layered hierarchy, and provide useful insights into the elucidation of unknown mechanisms related to ECF sigma factors.