Testis differentiation in zebrafish involves juvenile ovary to testis transformation initiated by an apoptotic wave. The molecular regulation of this transformation process is not fully understood. NF-κB is activated at an early stage of development and has been shown to interact with steroidogenic factor-1 in mammals, leading to the suppression of anti-Müllerian hormone (Amh) gene expression. Because steroidogenic factor-1 and Amh are important for proper testis development, NF-κB-mediated induction of anti-apoptotic genes could, therefore, also play a role in zebrafish gonad differentiation. The aim of this study was to examine the potential role of NF-κB in zebrafish gonad differentiation. Exposure of juvenile zebrafish to heat-killed Escherichia coli activated the NF-κB pathways and resulted in an increased ratio of females from 30 to 85%. Microarray and quantitative real-time-PCR analysis of gonads showed elevated expression of NF-κB-regulated genes. To confirm the involvement of NF-κB-induced anti-apoptotic effects, zebrafish were treated with sodium deoxycholate, a known inducer of NF-κB or NF-κB activation inhibitor (NAI). Sodium deoxycholate treatment mimicked the effect of heat-killed bacteria and resulted in an increased proportion of females from 25 to 45%, whereas the inhibition of NF-κB using NAI resulted in a decrease in females from 45 to 20%. This study provides proof for an essential role of NF-κB in gonadal differentiation of zebrafish and represents an important step toward the complete understanding of the complicated process of sex differentiation in this species and possibly other cyprinid teleosts as well.