He immersed himself in the city’s past, amassing a huge library of books and photographs and researching every detail of its past and could turn up virtually any fact within minutes.
As a lecturer and author, he was always generous with his information, willing to share his knowledge with anyone who showed interest in the city and its past.
He was born in Hull, where his father Donald was fish stock superintendent for the London and North East Railway (LNER).
At the outbreak of war, he was evacuated to live with his grandfather John, who was assistant chief general superintendent of the London, Midland and South (LMS) railway on the Welsh borders.
After his father moved to York as LNER’s assistant goods and passenger manager, the young Hugh followed in 1943.
He was educated at St Olave’s School and St Peter’s before going up to Oxford and studying physics at Jesus College. He then went to British Rail on a graduate apprenticeship, becoming the fifth generation of his family to join the railways.
He worked in the signal engineering department at London’s King’s Cross station until he was called for National Service serving at the RAF’s ground base at Honington.
On returning to the railways as a signal engineer he worked in London before becoming a divisional signal engineer, firstly in Norwich and then, in 1970, in Leeds. He returned to York four years later as assistant signal engineer for British Rail’s eastern region and stayed until retirement in 1988.
At school, he was turned off history by unimaginative teaching, but his interest was awakened in Norwich when he came across a book of photographs which drew his attention to the buildings above the modern shop fronts.
When he moved back to York, he looked at it differently and his preparation for retirement and a second career was complete.
In 2004, he was presented with a British Association for Local History award for personal achievement for his services to York’s local history.
More than 1,500 lectures, a local history course that ran for 15 years, and a popular guided walks programme all inspired others to follow in his footsteps. He had an impressive list of publications including articles in many local history and other journals, and published several books including A Golfing Odyssey: the Centenary History of York Railway Institute Golf Club. His first, in 1980, was a history of the horse tramways of York.
He was a leading member of the Yorkshire Architectural and York Archaeological Society, being chairman from 1991 to 2002, and editor of Yorkshire Historian from 1984 to 2000.
He was on the Council of Friends of York Minster and York Civic Trust, and in the Yorkshire Heraldry Society. He had a particular interest in the listed York Cemetery, which opened in 1837 and was rescued from ruin by an organisation of Friends.
As a trustee, treasurer and administrator for many years, he created a database of all the burials which is now an invaluable research tool for other historians as well as people with relatives buried there.
Mr Murray, who was married late in life, in 2001, is survived by his wife Jill, a granddaughter of John Ward Knowles, the prominent York stained glass manufacturer of the late 19th and early 20th century.