Tumor necrosis factor receptor-associated factors (TRAFs) have been studied in a few mollusks and participate in various biological processes, like apoptosis, immune response, stress, and inflammatory response. However, TRAFs’ function and mechanism of pearl oysters (Pinctada fucata martensii) are still unclear. In this study, we identified novel PmTRAF2 and PmTRAF4 from P. f. martensii. The deduced PmTRAF2 and PmTRAF4 proteins contain TRAF-type zinc finger domain and MATH domain, while PmTRAF4 lacks a RING finger domain. Multiple sequence alignment revealed that PmTRAF2 and PmTRAF4 had high homology with the ortholog of other species. Phylogenic analysis indicated that PmTRAF4 was closer to the homolog protein of Mytilus edulis and Mytilus galloprovincialis, and PmTRAF2 was closer to Crassostrea gigas TRAF2. The real-time quantitative PCR (qPCR) analysis revealed that PmTRAF2 and PmTRAF4 were expressed in all six tissues, and both of them were significantly expressed in hepatopancreas and gill (p < 0.01). Under lipopolysaccharide (LPS) stimulation, polyinosinic acid (PolyI:C) stimulation, and nucleus insertion surgery, the transcripts of PmTRAF2, PmTRAF3, PmTRAF4 and PmTRAF6 in hepatopancreas were markedly changed at corresponding time points. These results have indicated that these genes may play a role in P. f. martensii innate immunity. Yeast two-hybrid assays show that PmTRAF2 interacts with PmTRAF6 but not PmTRAF3, potentially affecting downstream immune signaling pathways. Our findings provide new perspectives for further investigation of TRAFs’ immune mechanisms in bivalves.