An important innate immune response in Drosophila melanogaster is the production of antimicrobial peptides (AMPs). Expression of AMP genes is mediated by the Toll and immune deficiency (IMD) pathways via NF-κB transcription factors Dorsal, DIF and Relish. Dorsal and DIF act downstream of the Toll pathway, whereas Relish acts in the IMD pathway. Dorsal and DIF are held inactive in the cytoplasm by the IκB protein Cactus, while Relish contains an IκB-like inhibitory domain at the C-terminus. NF-κB factors normally form homodimers and heterodimers to regulate gene expression, but formation of heterodimers between Relish and DIF or Dorsal and the specificity and activity of the three NF-κB homodimers and heterodimers are not well understood. In this study, we compared the activity of Rel homology domains (RHDs) of Dorsal, DIF and Relish in activation of Drosophila AMP gene promoters, demonstrated that Relish-RHD (Rel-RHD) interacted with both Dorsal-RHD and DIF-RHD, Relish-N interacted with DIF and Dorsal, and overexpression of individual RHD and co-expression of any two RHDs activated the activity of AMP gene promoters to various levels, suggesting formation of homodimers and heterodimers among Dorsal, DIF and Relish. Rel-RHD homodimers were stronger activators than heterodimers of Rel-RHD with either DIF-RHD or Dorsal-RHD, while DIF-RHD-Dorsal-RHD heterodimers were stronger activators than either DIF-RHD or Dorsal-RHD homodimers in activation of AMP gene promoters. We also identified the nucleotides at the 6th and 8th positions of the 3' half-sites of the κB motifs that are important for the specificity and activity of NF-κB transcription factors.