The law practice, which has offices at CityPoint in Haymarket, will provide specialist support to the in-house legal teams at the City of Edinburgh, Stirling, West Lothian, East Lothian and Midlothian councils.
The firm has been appointed on four lots of the Legal Services Framework, covering commercial advice, property and planning, litigation and employment law.
The contract will run for two years with the option of a two-year extension, and the overall framework is worth an estimated total value of £12 million over its lifetime.
Chairman Lorne Crerar said: “Our team is looking forward to extending the works it does with The City of Edinburgh Council and associated councils under the framework.”
Harper Macleod is currently appointed to act for 24 of Scotland’s 32 local authorities.