Born in Scotland, McLaren learned horticulture by working as a gardener at country estates and the Royal Botanic Garden. In 1872, he immigrated to the U.S. where he began work as Head Gardener at the El Cerrito estate outside San Francisco.
McLaren was asked, along with Frederick Law Olmsted Sr. to assess San Francisco Superintendant of Parks, William Hammond Hall's tree plantations at Golden Gate Park. This interaction led to McLaren’s nomination as Hall's successor in 1889. Over the course of his tenure McLaren would introduce over 600 species into the northern California landscape and make large-scale improvements to the park system, including the completion of Golden Gate Park. His naturalistic designs were inspired by his time in the Sierra Mountains alongside his friend John Muir. He also received a number of private commissions including Graceada Park, Lithia Park, and the Fagan House. In 1912, he was made Landscape Engineer for the Panama Pacific International Exposition and worked as a horticultural consultant for the Palace of Fine Arts.
In 1904, McLaren published Gardening in California Landscape and Flower, a seminal tome on the use of plants in California gardens. His work led to his designation as an Associate of Honour by the Royal Horticultural Society in 1930. His influence within the park system was so great that he was allowed to continue working past the mandatory retirement age, which he did until his death in 1943.