The TARDIS lands on a remote island, surrounded by a sea of acid. They meet Arbitan, keeper of the Conscience of Marinus who forces the travellers to go in search of five keys.
In the city of Morphoton, the Doctor, Barbara, Ian and Susan are welcomed as honoured guests and given anything they want. But Barbara soon discovers that paradise is an illusion.
Ian and Barbara find a temple in the middle of a hostile jungle. Inside is the ailing Darrius, keeper of one of the keys. As Darrius dies he gives Ian a clue to find the key.
In a snowy wasteland, Vasor, an unscrupulous trapper, imprisons the travellers in a frozen cavern inside a mountain. There they find one of the keys frozen in a block of ice.
Arriving in the city of Millennius, Ian is put on trial for murder. The Doctor takes on the role of defence counsel and must prove Ian's innocence or he will be executed.
The Doctor solves the murder mystery and finds the final missing key. With Ian now free, the travellers return to the island only to discover that Arbitan has been murdered.