Members of the gammaproteobacterial Photorhabdus genus share mutualistic relationships with Heterorhabditis nematodes, and the pairs infect a wide swath of insect larvae. Photorhabdus species produce a family of stilbenes, with two major components being 3,5-dihydroxy-4-isopropyl-trans-stilbene (compound 1) and its stilbene epoxide (compound 2). This family of molecules harbors antimicrobial and immunosuppressive activities, and its pathway is responsible for producing a nematode "food signal" involved in nematode development. However, stilbene epoxidation biosynthesis and its biological roles remain unknown. Here, we identified an orphan protein (Plu2236) from Photorhabdus luminescens that catalyzes stilbene epoxidation. Structural, mutational, and biochemical analyses confirmed the enzyme adopts a fold common to FAD-dependent monooxygenases, contains a tightly bound FAD prosthetic group, and is required for the stereoselective epoxidation of compounds 1 and 2. The epoxidase gene was dispensable in a nematode-infective juvenile recovery assay, indicating the oxidized compound is not required for the food signal. The epoxide exhibited reduced cytotoxicity toward its producer, suggesting this may be a natural route for intracellular detoxification. In an insect infection model, we also observed two stilbene-derived metabolites that were dependent on the epoxidase. NMR, computational, and chemical degradation studies established their structures as new stilbene-l-proline conjugates, prolbenes A (compound 3) and B (compound 4). The prolbenes lacked immunosuppressive and antimicrobial activities compared with their stilbene substrates, suggesting a metabolite attenuation mechanism in the animal model. Collectively, our studies provide a structural view for stereoselective stilbene epoxidation and functionalization in an invertebrate animal infection model and provide new insights into stilbene cellular detoxification.