Moyes was appointed as the new Hammers boss last week and has acted swiftly to name 59-year-old Irvine on his coaching staff.
Stuart Pearce and Billy McKinlay are also joining Moyes in London, McKinlay leaving Sunderland where he has been in caretaker charge.
Irvine was Moyes’ No.2 at Everton for nearly five years before he became North End boss in November 2007.
He managed Preston until December 2009, guiding them to the play-offs.
The Scotsman went on to manage Sheffield Wednesday and West Bromwich Albion, in between returning to Everton to head their youth system.
Last season, Irvine joined Norwich as assistant manager to Alex Neil – now PNE boss.
When the Canaries sacked Neil in March, Irvine took the reins as caretaker manager for the remainder of the season.
Irvine said: “I obviously know David well from our time together at Everton, and it was certainly a big attraction to work with him again, as was the thought of coming to a club like West Ham.
“This is the sixth job I have been offered since leaving Norwich at the end of last season – some of which were very attractive – but it’s the first one that has persuaded me to accept, so I hope that says a lot about how excited I am to be here.
“The prospect of working in the Premier League again, at a great club and alongside David, meant that it was an opportunity I couldn’t resist.
“I hope that I can now make a positive contribution.”
Former England left-back Pearce, who’s last job was as Nottingham Forest boss in 2015, said: “The opportunity to work with David Moyes, who I have respected greatly over the years, was a big factor, as was having previously played for the club.
“It’s been many years since I was here, but I really enjoyed my time”