Is the attribute of justice one of the attributes of Allah’s Essence or of His actions?
Question

Is the divine attribute of justice one of the attributes of Allah’s Essence or of His actions? Please explain in detail.
Praise be to Allah.Firstly:
Affirming the divine attribute of justice
The divine attribute of justice is affirmed, as it was narrated in al-Bukhaari (3150) and Muslim (1062) from ‘Abdullah ibn Mas‘ood, regarding the one who objected to the Prophet’s division of the war booty, and he (blessings and peace of Allah be upon him) said: “Who will be just if Allah and His Messenger are not just?”
Allah’s words are affirmed to be just, as He, may He be exalted, says (interpretation of the meaning): “And the word of your Lord has been fulfilled in truth and in justices” [al-An‘aam 6:115].
Ibn al-Qayyim (may Allah have mercy on him) said:
Justice is one of Allah’s attributes in His actions and His words, and it is an attribute of His judgement.
A similar meaning was narrated from Mu‘aadh (may Allah be pleased with him), that he never sat in a gathering of dhikr without saying: Allah is a just Judge, may those who doubt perish… Narrated by Abu Dawood (4611) in a mawqoof report; classed as saheeh by al-Albaani.
Secondly:
Justice as an attribute of Allah’s Essence
Justice is an attribute of Allah’s Essence. The guidelines on the attributes of Allah’s Essence is that they are attributes that He has always had and will always have. Thus He is just and fair, possessor of justice and fairness, from eternity to eternity.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The attributes of Allah’s Essence are attributes that always belong to Him, from eternity to eternity, such as life, knowledge, might, hearing, sight, power, wisdom and so on; there are many of these attributes. We call them attributes of Allah’s Essence because He has these attributes from eternity to eternity, and is never without them.
End quote from Sharh as-Safaareeniyyah, p. 155.
For information on the difference of scholarly opinion on calling Allah al-‘Adl (justice) and al-Muqsit (the fair), see the answers to question no. 104488  .
And Allah knows best.