Joash may have started well, but he didn’t end so well.
Despite being raised in the Temple, Joash had led the people away from God. This resulted in defeat at the hands of Hazael, king of Aram:
2 Chronicles 24:24 Although the Arameans attacked with only a small army, the Lord helped them conquer the much larger army of Judah. The people of Judah had abandoned the Lord, the God of their ancestors, so judgment was carried out against Joash.
Joash survived. He was seriously wounded in the battle, and seems to have been able to buy some reprieve:
2 Kings 12:18 King Joash collected all the sacred objects that [he and previous kings] had dedicated. He sent them all to Hazael, along with all the gold in the treasuries of the Lord’s Temple and the royal palace. So Hazael called off his attack on Jerusalem.
But not for long:
2 Kings 12:20 Joash’s officers plotted against him and assassinated him at Beth-millo on the road to Silla.
The reason was neither his military defeat nor the loss of the Temple treasury, but these could well have weakened him politically:
2 Chronicles 24:25 But his own officials plotted to kill him for murdering the son of Jehoiada the priest. They assassinated him as he lay in bed. Then he was buried in the City of David, but not in the royal cemetery.