He became general manager of New Zealand Railways in 1933 and served until 1940, During his tenure, Mackley worked hard to improve the standard and range of services provided by the railways. He won approval for the construction of an inspection car in which he travelled the entire system inspecting stations and meeting staff. The car’s success encouraged him to order the construction of railcars that were to serve the railways for many years.
He also wanted to improve the comfort of passengers, and initiated a building program in the local businesses that was to provide the basis of passenger carriage stock for many years. Mackley also ventured in to politics as a member of the New Zealand National Party. He was elected as the Member of Parliament for Masterton (1943 - 1946) and then for Wairarapa (1946 – 1949).