An increasing ecological phase-shift from coral dominated reefs to macroalgae dominated reefs as a result of anthropogenic impacts, such as eutrophication, sedimentation, and overfishing, has been observed in many reef systems around the world. Ocean warming is a universal threat to both corals and macroalgae, which may alter the outcome of competition between them. Therefore, in order to explore the effects of indirect and direct exposure to macroalgae on the physiological, biochemical, and genetic expression of corals at elevated temperature, the coral Acroproa hyacinthus and highly invasive green algae Caulerpa taxifolia have been chosen. Physiologically, the results exhibited that distinguish from control and direct contact treatments, the density and chlorophyll a content of zooxanthella decreased by 53.1% and 71.2% respectively, when coral indirect contacted with algae at ambient temperature (27°C). Besides, enzyme activities of superoxide dismutase (SOD) and catalase (CAT) in coral tissue were enhanced by interacting with algae. After an increase of 3°C, the density and chlorophyll a content of zooxanthella reduced by 84.4% and 93.8% respectively, whereas the enzmy activities of SOD and CAT increased by 2.3 and 3.1-fold. However, only the zooxanthellae density and pigment content decreased when C.taxifolia co-culture with A.hyacinthus at 30°C. Molecularly, different from the control group, the differentially expressed genes (DEGs) such as Rab family, ATG family and Casp7 were significantly enriched in endocytosis, autophagy and apoptosis pathways , regardless whether A.hyacinthus was indirect or indirect exposure to C.taxifolia at 27°C. Under thermal stress without algae interaction, the DEGs were significantly enriched in microbial immune signal transduction pathways, such as Toll-like receptor signaling pathway and TNF signaling pathway, while multiple cellular immunity (IFI47, TRAF family) and oxidative stress (CAT, SODC, HSP70) genes were up-regulated. Inversely, compared with corals without interaction with algae at 30°C, the DEGs of corals interacted with C.taxifolia at 30°C, were remarkably enriched in apoptosis, NOD-like receptor signaling pathway, including the transcription factors such as Casp family, TRAF family. In conclusion, the density and chlorophyll a content of zooxanthella remained a fading tendency induced by macroalgae at ambient temperature. The oxidative stress and immune response levels of coral has been elevated at 30°C, but macroalgae alleviated the negative effects triggered by thermal stress.