Soil salinity and mineral deficiency are major problems in agriculture. Many studies have reported that plant-associated microbiota, particularly rhizosphere and root microbiota, play a crucial role in tolerance against salinity and mineral deficiency. Nevertheless, there are still many unknown parts of plant–microbe interaction, especially regarding their role in halophyte adaptation to coastal ecosystems. Here, we report the bacterial community associated with the roots of coastal sand dune halophytes Spinifex littoreus and Calotropis gigantea, and the soil properties that affect their composition. Strong correlations were observed between root bacterial diversity and soil mineral composition, especially with soil Calcium (Ca), Titanium (Ti), Cuprum (Cu), and Zinc (Zn) content. Soil Ti and Zn content showed a positive correlation with bacterial diversity, while soil Ca and Cu had a negative effect on bacterial diversity. A strong correlation was also found between the abundance of several bacterial species with soil salinity and mineral content, suggesting that some bacteria are responsive to changes in soil salinity and mineral content. Some of the identified bacteria, such as Bacillus idriensis and Kibdelosporangium aridum, are known to have growth-promoting effects on plants. Together, the findings of this work provided valuable information regarding bacterial communities associated with the roots of sand dune halophytes and their interactions with soil properties. Furthermore, we also identified several bacterial species that might be involved in tolerance against stresses. Further work will be focused on isolation and transplantation of these potential microbes, to validate their role in plant tolerance against stresses, not only in their native hosts but also in crops.