2 Chronicles 26:16-21:

But when he [Uzziah] was strong, his heart was lifted up to his destruction: for he transgressed against the LORD his God, and went into the temple of the LORD to burn incense upon the altar of incense.
And Azariah the priest went in after him, and with him fourscore priests of the LORD, that were valiant men:
And they withstood Uzziah the king, and said unto him, It appertaineth not unto thee, Uzziah, to burn incense unto the LORD, but to the priests and the sons of Aaron, that are consecrated to burn incense: go out of the sanctuary; for thou hast trespassed; neither shall it be for thine honour from the LORD God.
Then Uzziah was wroth, and had a censer in his hand to burn incense: and while he was wroth with the priests, the leprosy even rose up in his forehead before the priests in the house of the LORD, from beside the incense altar.
And Azariah the chief priest, and all the priests, looked upon him, and, behold, he was leprous in his forehead, and they thrust him out from thence; yea, himself hasted also to go out, because the LORD had smitten him.
And Uzziah the king was a leper unto the day of his death, and dwelt in a several house, being a leper; for he was cut off from the house of the LORD: and Jotham his son was over the king’s house, judging the people of the land.

Notes on 2 Chronicles 26:16-21:

God never authorized King Uzziah to perform priestly functions.  He should have known better than to attempt to do so, because this very sin had disqualified Saul from being king over Israel.  Apparently, he was too proud to care, and his pride caused him to take the holy things of God lightly.  He attempted the priestly function of burning incense, and God was incensed.  Taking the holy things of God lightly is the same sin that sent many Corinthians to early graves as well (1 Corinthians 11:27-32).  We need to judge ourselves regarding our conduct around the things of God so that judgment does not fall on us.  Even under grace, this sin can disqualify you for healing unless you repent.

See also:

Sickness as Chastening and Judgment in the Old Testament
Condition: Leprosy