An experiment for the preparation of mercuric oxide was first described by 11th century Arab-Spanish alchemist, Maslama al-Majriti, in Rutbat al-hakim. It was historically called red precipitate (as opposed to white precepitate being the mercuric amidochloride).
In 1774, Joseph Priestley discovered that oxygen was released by heating mercuric oxide, although he did not identify the gas as oxygen (rather, Priestley called it "dephlogisticated air," as that was the paradigm that he was working under at the time).