The story of how Allan Quatermain gets the map to the mines is told in chapter 2, "The Legend of Solomon's Mines," in the novel King Solomon's Mines by H. Rider Haggard. Quatermain, the narrator of the novel, meets Sir Henry Curtis and Captain Good on a ship bound for Durban, South Africa. Curtis is searching for his younger brother, who has gone missing somewhere in Africa, and he asks for Quatermain's assistance in finding him. It turns out that Quatermain saw Curtis's brother before he disappeared and knows that he has gone to seek for Solomon's diamond mines.
While the three men are speaking, Quatermain tells the other two how he came into possession of a map to the mines. Ten years earlier, he had got an attack of fever on the other side of the desert from the mountains where Solomon's mines were supposed to be located. A Portuguese man named Jose Silvestre stopped by his camp. Before Silvestre began his journey across the great desert, he told Quatermain that if he made it back he would be "the richest man in the world."
A week later, as Quatermain was recovering from his fever, Silvestre crawled out of the desert, parched with thirst and almost dead. Quatermain gave him water and milk and put him to rest in his tent. Early the next morning, realizing that he was dying, Silvestre gave the map to Quatermain. The map and writing were made by Silvestre's ancestor, Jose da Silvestra, three hundred years earlier, and Silvestre had spent years figuring out their meaning. Da Silvestra, after seeing "countless diamonds stored in Solomon's treasure chamber," died on the mountains where the mines are located, and his slave found his body and brought back the map and the note, which were eventually passed down to Silvestre.