The son of Patrick Stirling, Matthew Stirling was born in Kilmarnock in 1856. He served an apprenticeship at Doncaster before being appointed to the Nottingham District of the Great Northern Railway (GNR). It is from this post, that he became the Chief Locomotive Superintendent of the newly formed Hull & Barnsley Railway (H&BR) in 1885. He stayed with the H&BR until it was taken over by the North Eastern Railway (NER) in 1922. During his tenure, the position was renamed "Chief Mechanical Engineer" in line with similar name changes at other companies. Matthew Stirling retired in 1922, and died on 5th October 1931.
Matthew Stirling was known for following the traditions of his father, including domeless boilers and spartan cabs. He tended to design engines with larger boilers, though; and his powerful 0-8-0 mineral locomotives were sought after by the NER during WW1.