The move to Edinburgh sees McAvoy link-up with Joe Savage who was previously PNE's head of recruitment - Savage is now sporting director at the Tynecastle club.
McAvoy was sacked by North End at the start of December after seven months as head coach.
He had been interim head coach for eight games at the end of last season after the dismissal of Alex Neil.
Before that McAvoy worked as Neil's No.2 at Deepdale, with him also his assistant at Norwich and Hamilton Academical.
McAvoy told Hearts' official website: "I'm delighted and excited about the challenge ahead,
"Joe Savage was a big influence, I had a great working relationship with him at Hamilton, Norwich and Preston. Joe moved here to be sporting director and he gave me a call about the role.
"When he made the call, I thought massive club, fantastic fan base and they are doing extremely well.
"It looks like a good place to be and my task is to see if we can develop players to get them into the fiurst-team."
Explaining McAvoy's appointment, Savage said: "This isn’t an appointment we wanted to rush and in Frankie we have got the right person for what is a very important job.
“I’m lucky enough to have known Frankie for a while, having worked with him both in Scotland and England, and he is a top operator with so much high-level experience.
“He ticks every box, having coached at youth level and helping to get young talent into the first team with Hamilton Accies, right the way through to coaching in the Premier League and managing in the Championship.
“There will no doubt be a few new challenges for him in this role but I’ve no doubt he will excel in it.
"It’s an exciting time for this club as we continue to put all the building blocks in place for sustained success, and I’m really happy that we’ve got someone of Frankie’s calibre on board."