George Powell, 38, and Layton Davies, 51, made the find, which included coins believed to date from the reign of King Alfred the Great, while scanning farmland in Leominster, central England.
British law requires that such discoveries must be declared to the landowner and reported to the local coroner.
But the men kept the find to themselves and began to release the coins to the market through two specialist dealers, Worcester Crown Court heard.
On Friday, Powell was jailed for 10 years and Davies for 8-1/2 years.
"The coins Davies and Powell found were more than 1,100 years old and bore the inscriptions of Aelfred and Ceolwulf from the Saxon-Viking period," said Lesley Milner of the Crown Prosecution Service.
"This find had immense historical value and should have been disclosed to the relevant authorities. But Davies and Powell actively hid their haul for their own selfish gain."
Alfred ruled the southern area of Wessex from 871 until 899 while Ceowulf II was king of Mercia, north of Wessex, from 874-9.
Milner said the treasure would have been worth at least 2.9 million pounds.The two men were both found guilty of theft and, along with the two dealers, conspiracy to convert or conceal criminal property.