Although the widely cultured Litopenaeus vannamei is highly tolerant to varying salinity levels, the rapid fluctuation of abiotic and biotic factors due to climatic changes may become stressors to the shrimp’s physiology, resulting in impaired immunity and increased disease susceptibility. This study aimed to investigate the combined effects of both factors towards L. vannamei at transcriptomic level. L. vannamei were cultured at three different salinity levels (5ppt, 20ppt and 30ppt) for 60 days and were challenged with Vibrio harveyi. RNA-seq analysis was conducted on the hepatopancreas to assess the differential expressed genes (DEGs) in both control and V. harveyi infected groups. Our results revealed 5,725 DEGs was observed in shrimp reared at 5ppt, 3,643 DEGs at 20ppt and 1,560 DEGs at 30ppt. Most DEGs were identified to be associated with osmoregulation and transport activities, immune and stress regulation, nutrient metabolism, growth, chitin binding, gonadal development, and metal ion binding and toxicity. We identified that shrimp cultured at intermediate salinity of 20 ppt exhibits the greatest immunity level after infection by V. harveyi, given that low salinity (5ppt) may augment the free ion metal toxicity, resulting in higher disease susceptibility. Both V. harveyi and salinity stress function together or separately to activate a wide range of immune and stress regulatory genes, which could be potential candidate markers for future RNAi and knockdown research in developing efficient prophylactic management strategies for L. vannamei.