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.
“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.