The Great Key of Rassilon was one of the Artefacts of Rassilon. It was rarely in the possession of the Lord President. The Chancellor typically held the Great Key. A forbidden weapon known as the De-mat Gun was activated by the Great Key. (TV: The Invasion of Time)
Following the Great Key's creation and the development of Gallifreyan society, Rassilon entrusted the Great Key of Rassilon with the chancellor; if the Lord President were to have the Sash, Rod and Great Key of Rassilon, he would have absolute power, therefore it had to be kept out of the President's hands to prevent a dictatorship. No record of this was mentioned in the Matrix. (TV: The Invasion of Time)
Following signing a treaty with the Vardans, the Fourth Doctor travelled to Gallifrey and declared his intentions to become Lord President, a declaration which was unchallenged; as part of his oath, the Fourth Doctor was tasked with finding the Great Key of Rassilon. According to Borusa, though every President similarly took the same oath, none had ever found it prior to this encounter. The Doctor revealed that everything he was doing was all an act to find the Vardans' planet of origin and place it in a time loop.
Following the defeat of the Vardans and the subsequent invasion by the Sontarans, the Doctor refused to let them have the Great Key and interrogated Borusa for its whereabouts, tricking him into revealing he had it. Though Borusa attempted to deceive him by first claiming that it was merely a legend, then handing the Doctor a fake, Borusa eventually was forced to give him the genuine article, telling him that he was the first President since Rassilon to hold the Great Key. The Doctor later gave it to Leela to look after briefly, an act Borusa strongly disagreed with but the Doctor assured him she wouldn't let anything happen to it.
The Doctor later had Rodan build a demat gun while under hypnosis, which was armed using the Great Key. He erased the Sontaran accompanying Castellan Kelner before using it on a bomb that Stor planned to use on the Eye of Harmony. This obliterated Stor and cancelled the bomb's explosion but also destroyed the demat gun as well as erasing the Doctor's memory of his actions on Gallifrey. The Great Key, however, survived this, and was likely returned to Borusa's ownership. (TV: The Invasion of Time)
During the Last Great Time War, the Eighth Doctor was imprisoned for over a month on an unknown planet with a Malmooth named Chantir; it was later revealed that the Doctor had planned his imprisonment to infiltrate the prison and steal the Great Key when it arrived on a transport. After escaping with the Key, the Doctor explained it had once been part of a weapon called the de-mat gun, a weapon that could "...remove something completely from time and space."
When asked if it would "...become another de-mat gun... a weapon of destruction...?" the Doctor replied, "Yes. But not as small as a gun. The de-mat gun removes people from time and space - one at a time. I may need to create something that removes millions from time and space - at once. This key will lock the Medusa Cascade forever — if we need to." (COMIC: The Forgotten)