The original inhabitants of the region were the Khoikhoi herders and the San hunter gatherers. Following the arrival of the early European colonists, the area was settled by Afrikaner Trekboers and Griqua people.
The town itself owes its existence to the Cape Government Railways, and to the route that their founder, Cape Prime Minister John Molteno, chose for a railway line that would connect Cape Town's port to the diamond fields of Kimberley. The Royal Commonwealth Society (1898) records that in a meeting with his consulting engineers, the Prime Minister called for a map of Southern Africa to be brought to him and, taking a ruler, drew his pen along it from Cape Town all the way inland. He then handed the map to the engineers, telling them to build the railway accordingly.
The line rapidly extended inland, and a station was built on 1 February 1878, that was named "Matjiesfontein". The name was derived from a type of sedge, Cyperus textilis, used by Khoekhoen to make mats (matjies) employed in the construction of their huts.
Originally, Matjiesfontein was only a small depot and farm, however a Scotsman by the name of James Douglas Logan, who was superintendent of this stretch of railway, bought land at Matjiesfontein, moved there because of his weak chest, and opened a refreshment station for the passing trains. This was so successful that the business soon formed the nucleus of a growing village. Logan was unintentionally very influential in South African history as he had secured the catering contract for the railways through his friend in parliament, James Sivewright, and discovery of the corruption involved led to the fall of the first government of Prime Minister Cecil Rhodes in 1893.
A town was laid out in the 1880s, and formally purchased in 1968 to be preserved for its Victorian charm. The whole town was declared a National Monument on 12 September 1975, the railway station on 15 December 1989 and the cemetery on 23 September 1994.
An inaugural Fever Tree was planted at The Lord Milner Hotel by artist Beezy Bailey, Premier to the Western Cape Helen Zille and local environmentalist from Greenpop, Misha Teasdale on 6 August 2012.
The town of Matjiesfontein is located 27 km west of Laingsburg and 54 km east of Touwsrivier. The surrounding Karoo region is a flat, sparsely populated semi-desert. Matjiesfontein has a healthy climate for people with lung complaints, and was once home to a Victorian spa and health resort.