Levein replaces Locke at Hearts
The Edinburgh club suffered demotion from Scotland's top tier following a season that they started with a 15-point deduction after entering administration in June.
However, Hearts cleared the final hurdle to exiting administration last week as businesswoman Ann Budge completed her takeover of the club.
And, despite a run of five wins in their last eight games, Budge's first move has been to replace Locke with former Scotland boss Levein.
"We know it may be an unpopular decision with some of you, but the board has decided that we cannot offer Gary Locke a new contract as manager, at the end of his current contract," Budge said in a statement on the club's website.
"Please believe me when I say this has been an enormously difficult decision to make. We all know the pressures that Gary and his assistant, Billy Brown, have worked under over the last year.
"They were set an almost impossible task, which they handled with dignity and determination. For that, we are all hugely grateful to both of them.
"The players and backroom/support staff at Riccarton will be sorry indeed to see them go…as, I know, will a very large section of the Hearts support. They will both leave with our very grateful thanks and best wishes.
"Craig Levein will join the club with immediate effect and will assume total responsibility for everything to do with the playing side of the business.
"He will be responsible for putting in place an end-to-end strategy for how we are going to implement a youth-driven playing policy within the club."
Meanwhile, St Mirren have parted company with boss Danny Lennon, opting not to renew his contract with the club following an eighth-placed finish.