West Ham announced the news late on Sunday evening, adding that Moyes also wants to recruit Billy McKinlay - now in a caretaker role at Moyes' former club Sunderland, who confirmed the Scot had left the club in a statement on their website.
Pearce returns to the club he made 50 appearances for after 16 years alongside Alan Irvine as Moyes' assistant coaches.
Stuart Pearce and Billy McKinlay are also joining Moyes in London, McKinlay leaving Sunderland where he has been in caretaker charge.
Irvine's last job was acting as assistant to Alex Neil at Norwich City.
Hernandez started only six league games in Moyes' spell as Manchester United manager in the 2013-14 season but Moyes said the Mexican would get his opportunities at West Ham.
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".
Rick Ross, Julius Erving & Others Rally for Meek Mill in Philadelphia
All that shit contributes to unjust sentences, so when you posting " Click-Bait" know that YOU are facilitating the problem too. Brinkley, who handed down the sentence after Mill failed a drug test and violated travel restrictions set out by probation.
"I'm really looking forward to coming in and getting involved.
Hopefully I will have something settled by the end of the week".
"It's not going to be easy, no one is expecting it to be, because the stakes are very high in the Premier League, but I think with the staff here and the squad of players, we have a great chance".
"It's been many years since I was there for a couple of seasons, but I really enjoyed my time".
"David (Moyes) is acutely aware - as we all are - of exactly where the club are at this moment in time", Pearce told the club's website. I've watched West Ham a lot from the outside, because it's one of my former clubs, I probably keep a closer eye on things.
"The media work has been good for me, but I really feel that I've got something to offer the coaching set-up here".