The response of microbiomes to salinity has been clarified in different geographic scales or ecosystems. However, how soil microbial community structure and interaction respond to salinity across wide salinity range and climatic region is still unclearly resolved. To address this issue, we examined the microbial community's composition in saline soils from two climatic regions (coastal wetland and arid desert). Our research confirms that soil salinity had a negative effect on soil nutrient content. Salinity decreased the relative abundance of bacteria, but increased archaea abundance, leading to the shifts from bacteria dominant community to archaea dominant community. Low-water medium-salinity soil (LWMS) had the most complex archaeal community network, whereas for bacteria, the most complex bacterial community network was observed in low-water high-salinity soils (LWHS). Key microbial taxa differed in three salinity gradients. Salinity, soil water content, pH, total nitrogen (TN), and soil organic carbon (SOC) were the main driving factors for the composition of archaeal and bacterial community. Salinity directly affected archaeal community, but indirectly influenced bacteria community through SOC; pH affected archaeal community indirectly through TN, but directly affected bacterial community. Our study suggests that soil salinity dramatically influences diversity, composition, and interactions within the microbial community.