Mr Shearer spent the first 21 years of his life at home with his parents, three brothers and his sister at Hillhead Park, Bonnyrigg, and was the youngest of the family.
The house had a large, one-acre walled garden and it was here that his lifelong interest in horticulture began.
He was a pupil at George Heriot’s School in Edinburgh, although at the outbreak of the war in 1939 became an evacuee and attended Lasswade Secondary School.
Mr Shearer left school in the summer of 1940, aged 14, and started work at Dobbies in Gilmerton, which was a nursery at that time.
His wages were the grand sum of eight shillings and sixpence – or 46p – for a 48-hour week.
By falsifying his age, Mr Shearer was able to join the Bonnyrigg Unit of the Local Defence Volunteers – later renamed the Home Guard. There was no uniform, just arm bands.
Later he acquired a Royal Enfield motorbike and became chief despatch rider for the unit.
He served throughout the war until the Home Guard was disbanded.
Enrolling as a student at the East of Scotland College of Agriculture in Edinburgh in 1942, he was the only student studying horticulture. He qualified in 1944 with the Scottish Diploma in Horticulture.
Following further studies, he gained a National Diploma in Horticulture and was then invited to join the college staff in the position of horticultural adviser to help the nation grow more food.
He remained in the post for 40 years. Latterly, he was in charge of the horticulture unit at Liberton as a senior horticultural adviser for the south-east of Scotland.
A keen rugby player, Mr Shearer played for Lasswade and Peebles, and was a founder member and chairman of Peebles Round Table and president of Peebles Rotary Club. He married Annette England in Liberton Parish Church on June 20, 1955. They lived in Eddleston for five years and moved to Broughton in May 1960.
They had a loving marriage and raised three children, Colin, Julie and Wendy.
Mr Shearer opened Beechgrove Garden to the public around 1965, and it has since raised tens of thousands of pounds for charitable causes, attracting visitors from around the world.
The BBC Scotland television series of the same name featured the garden more than once.
Throughout his life he received a number of awards, including the Scottish Horticultural Medal and Citizen of the Year for Tweeddale.
He was made an MBE in 2004 for services to horticulture.