An equitable education system is essential for all students to acquire the knowledge and skills necessary to become productive members of society. Pre-service teachers in education play a vital role in fostering equitable educational practices. This study aimed to measure the association between the social media-based community of inquiry and pre-service teachers' intentions toward social justice and equity in education. It focused on pre-service teachers enrolled in the education departments of universities in Gilgit Baltistan (GB), Pakistan. Census sampling was used to include all students enrolled in teacher education departments across universities in GB. The research utilized a multi-wave survey design, beginning with a baseline survey to assess pre-service teachers' presence on social media. This information guided the design of a community of inquiry on social media centered on the theme of social justice and equity in education. After 4 months, a second survey was conducted to measure the association between the community of inquiry and pre-service teachers' intentions toward social justice and equity. For data analysis, the study employed the partial least squares-consistent structural equation modeling (PLSc-SEM) approach. The novelty of the study lies in integrating the community of inquiry framework with the theory of planned behavior. We found a significant and positive association between the social media-based community of inquiry and pre-service teachers' attitudes, subjective norms, and perceived behavioral control regarding their intentions to implement social justice and equity in education. These findings hold the potential for developing prospective teachers and educational leadership with a strong focus on equity. Future research could explore creating a community of inquiry for pre-service teachers to enhance their mindset and skills for inclusive education. This aligns with the broader objective of achieving Sustainable Development Goal 4 (SDG 4) on fostering a more inclusive and equitable educational environment.