Growing evidence indicates that activator protein-1 (AP-1) plays a major role in stimulating the transcription of immune effector molecules in cellular response to an incredible array of stimuli, including growth factors, cytokines, cellular stresses and bacterial and viral infection. Here, we reported the isolation and characterization of a cDNA from Litopenaeus vannamei encoding the full-length c-Fos protein (named as Lvc-Fos). The predicted amino acid sequences of Lvc-Fos contained a basic-leucine zipper (bZIP) domain, which was characteristic of members of the AP-1 family. Immunoprecipitation and native-PAGE assays determined that Lvc-Fos could interact with the Lvc-Jun, a homolog of c-Jun family in L. vannamei, in a heterodimer manner. Further investigation demonstrated that Lvc-Fos and Lvc-Jun were expressed in all tested tissues and located in the nucleus. Real-time RT-PCR analysis showed both Lvc-Fos and Lvc-Jun in gills were up-regulated during Vibrio parahaemolyticus and white spot syndrome virus (WSSV) challenges. In addition, reporter gene assays indicated Lvc-Fos and Lvc-Jun could activate the expression of antimicrobial peptides (AMPs) of Drosophila and shrimp, as well as WSSV immediate early (IE) genes wsv069 and wsv249, in a different manner. Knockdown of Lvc-Fos or Lvc-Jun by RNA interference (RNAi) resulted in higher mortalities of L. vannamei after infection with V. parahaemolyticus, suggesting that Lvc-Fos and Lvc-Jun might play protective roles in bacterial infection. However, silencing of Lvc-Fos or Lvc-Jun in shrimp caused lower mortalities and virus loads under WSSV infection, suggesting that Lvc-Fos and Lvc-Jun could be engaged for WSSV replication and pathogenesis. In conclusion, our results provided experimental evidence and novel insight into the roles of L. vannamei AP-1 in bacterial and viral infection.