Background: Photosymbiotic associations between metazoan hosts and photosynthetic dinoflagellates are crucial to the trophic and structural integrity of many marine ecosystems, including coral reefs. Although extensive efforts have been devoted to study the short-term ecological interactions between coral hosts and their symbionts, long-term evolutionary dynamics of photosymbiosis in many marine animals are not well understood. Within Bivalvia, the second largest class of mollusks, obligate photosymbiosis is found in two marine lineages: the giant clams (subfamily Tridacninae) and the heart cockles (subfamily Fraginae), both in the family Cardiidae. Morphologically, giant clams show relatively conservative shell forms whereas photosymbiotic fragines exhibit a diverse suite of anatomical adaptations including flattened shells, leafy mantle extensions, and lens-like microstructural structures. To date, the phylogenetic relationships between these two subfamilies remain poorly resolved, and it is unclear whether photosymbiosis in cardiids originated once or twice. Results: In this study, we establish a backbone phylogeny for Cardiidae utilizing RNASeq-based transcriptomic data from Tridacninae, Fraginae, and other cardiids. A variety of phylogenomic approaches were used to infer the relationship between the two groups. Our analyses found conflicting gene signals and potential rapid divergence among the lineages. Overall, results support a sister group relationship between Tridacninae and Fraginae, which diverged during the Cretaceous. Although a sister group relationship is recovered, ancestral state reconstruction using maximum likelihood-based methods reveals two independent origins of photosymbiosis, one at the base of Tridacninae and the other within a symbiotic Fraginae clade.Conclusions: The newly revealed common ancestry between Tridacninae and Fraginae brings a possibility that certain genetic, metabolic, and/or anatomical exadaptation existed in their last common ancestor, which promoted both lineages to independently establish photosymbiosis, possibly in response to the modern expansion of reef habitats.