While the concept of social justice can be traced through Ancient and Renaissance philosophy, such as Socrates, Thomas Aquinas, Spinoza and Tom Paine, the term “social justice” only became used explicitly from the 1840s. A Jesuit priest named Luigi Taparelli is typically credited with coining the term, and it spread during the revolutions of 1848 with the work of Antonio Rosmini-Serbati. In the late industrial revolution, progressive American legal scholars began to use the term more, particularly Louis Brandeis and Roscoe Pound
Wikipedia
A principal ancient source for the concept, if not the term, would be Plato. Some folks would make the case that Karl Marx largely re-wrote Plato's Republic, with a layer of (bogus) economic added.
Interesting. Never heard the term until 5 years ago. Now I hear it all the time.