It was customary among the Romans to post a sign as the execution site, declaring the crime for which a criminal was being put to death. This sent a message to the people that the same thing would happen to them if they dared to disobey the law.
The charge against Jesus was that He claimed to be the king of the Jewish people. This was considered an act of sedition against the Roman government. Only the emperor had the authority to appoint rulers over the nations that Rome controlled.
This was actually a false charge, since Jesus never claimed to be a political king. As the Messiah, He was a spiritual leader who came to bring people into a heavenly kingdom-the kingdom of God (Matt 20:21).
MATTHEW 27:36-37 – 36 And sitting down they watched him there;
37 And set up over his head his accusation written, This Is Jesus The King Of The Jews.