Millions of years ago wild sugar cane, growing in what would later become Great Britain, was covered by sediments. Under high pressure and temperature, a result of the covering sediments, it was compressed into a treacle bearing rock. This story resembles the theory how coal was formed. To be honest the formation of coal was the master copy for this hoax.
But probably hoax is the wrong term. Treacle Mines are a kind of British folk tales. They are a joke which was spun over decades, generations of treacle miners told stories about treacle mining in the olde days. This joke is typical British humour.
The story about treacle mining even found its way into the books of Terry Pratchett. In the city Ankh-Morpork on the Discworld, there is a road called Treacle Mine Road, named after the mines which are now exhausted. And he even spins the story further: there are the Schmaltzberg fat mines in the city of Bonk in the country Überwald. They were formed when the Fifth Elephant hit the disc.