The <i>epeXEPAB</i> (formerly <i>yydFGHIJ</i>) locus of <i>Bacillus subtilis</i> encodes a minimalistic biosynthetic pathway for a linear antimicrobial epipeptide, EpeX, which is ribosomally produced and post-translationally processed by the action of the radical-SAM epimerase, EpeE, and a membrane-anchored signal 2 peptide peptidase, EpeP. The ABC transporter EpeAB provides intrinsic immunity against self-produced EpeX, without conferring resistance against extrinsically added EpeX. EpeX specifically targets, and severely perturbs the integrity of the cytoplasmic membrane, which leads to the induction of the Lia-dependent envelope stress response. Here, we provide new insights into the distribution, expression, and regulation of the minimalistic <i>epeXEPAB</i> locus of <i>B. subtilis</i>, as well as the biosynthesis and biological efficiency of the produced epipeptide EpeX*. A comprehensive comparative genomics study demonstrates that the <i>epe</i>-locus is restricted to but widely distributed within the phylum <i>Firmicutes</i>. The gene products of <i>epeXEP</i> are necessary and sufficient for the production of the mature antimicrobial peptide EpeX*. In <i>B. subtilis</i>, the <i>epeXEPAB</i> locus is transcribed from three different promoters, one upstream of <i>epeX</i> (P<sub><i>epeX</i></sub>) and two within <i>epeP</i> (P<sub><i>epeA1</i></sub> and P<sub><i>epeA2</i></sub>). While the latter two are mostly constitutive, P<sub><i>epeX</i></sub> shows a growth phase-dependent induction at the onset of stationary phase. We demonstrate that this regulation is the result of the antagonistic action of two global regulators: The transition state regulator AbrB keeps the <i>epe</i> locus shut off during exponential growth by direct binding. This tight repression is relieved by the master regulator of sporulation, Spo0A, which counteracts the AbrB-dependent repression of <i>epeXEPAB</i> expression during the transition to stationary phase. The net result of these three promoters is an expression pattern that ensures EpeAB-dependent autoimmunity prior to EpeX* production. In the absence of EpeAB, the general envelope stress response proteins LiaIH can compensate for the loss of specific autoimmunity by providing sufficient protection against the membrane-perturbating action of EpeX*. Hence, the transcriptional regulation of <i>epe</i> expression and the resulting intrinsic induction of the two corresponding resistance functions, encoded by <i>epeAB</i> and <i>liaIH</i>, are well balanced to provide a need-based immunity against mature EpeX*.