McLeish joins from fellow East Premier Division side Tynecastle, where he had been in charge since October last year.
As well as Newtongrange, he has also managed Tranent Juniors, Musselburgh and Haddington Athletic and had spells as assistant manager at Cowdenbeath and Hibernian.
McLeish succeeds Tony Begg, who resigned in July to take up a position with Hibs.
The new boss said: “I’m absolutely delighted to be manager of Penicuik Athletic.
Ken Buchanan: Statue of Scottish boxing legend unveiled on Edinburghs’s Leith Walk
Robbie Neilson reveals Hearts' chances of a new signing for Zurich tie - plus Alex Cochrane and Craig Halkett injury update
How the Hearts players rated in the 4-1 victory over Dundee United
Former Hearts striker steps out of 'comfort zone' with move to Turkish top flight
Hibs debrief: Alarm bells in the stand (and defence); Tavares decision; ref's big calls
“A club the size of Penicuik, with the ambition they have got, it feels really good to be involved in a club like this again."
The club said existing coaches Davie Lees, Grant Sandison and John Menzies will remain there as an integral part of the new management team.
Penicuik currently sit top of the East of Scotland Premier Division with a 100 per cent record after nine games and are through to the first round of the Scottish Cup.