The Manila clam (Ruditapes philippinarum) is a commercially important marine bivalve, which inhabits the estuarine and mudflat areas. The osmoregulation is of great significance for molluscs adaptation to salinity fluctuations. In this study, we investigated the effects of low salinity (10 psu) and high salinity (40 psu) stress on survival and osmoregulation of the R. philippinarum. The results of physiological parameters showed that the ion (Na+, K+, Cl-) concentrations and Na+/K+-ATPase (NKA) activity of R. philippinarum decreased significantly under low salinity stress, but increased significantly under high salinity stress, indicating that there are differences in physiological adaptation of osmoregulation of R. philippinarum. In addition, we conducted the transcriptome analysis in the gills of R. philippinarum exposed to low (10 psu) and high (40 psu) salinity challenge for 48 h using RNA-seq technology. A total of 153 and 640 differentially expressed genes (DEGs) were identified in the low salinity (LS) group and high salinity (HS) group, respectively. The immune (IAP, TLR6, C1QL4, Ank3), ion transport (Slc34a2, SLC39A14), energy metabolism (PCK1, LDLRA, ACOX1) and DNA damage repair-related genes (Gadd45g, HSP70B2, GATA4) as well as FoxO, protein processing in endoplasmic reticulum and endocytosis pathways were involved in osmoregulation under low salinity stress of R. philippinarum. Conversely, the ion transport (SLC6A7, SLC6A9, SLC6A14, TRPM2), amino acid metabolism (GS, TauD, ABAT, ALDH4A1) and immune-related genes (MAP2K6, BIRC7A, CTSK, GVIN1), and amino acid metabolism pathways (beta-Alanine, Alanine, aspartate and glutamate, Glutathione) were involved in the process of osmoregulation under high salinity stress. The results obtained here revealed the difference of osmoregulation mechanism of R. philippinarum under low and high salinity stress through physiological and molecular levels. This study contributes to the assessment of salinity adaptation of bivalves in the context of climate change and provides useful information for marine resource conservation and aquaculture.