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".
Facebook Kills Messenger Day, Merges it with Facebook Stories
As per him some individuals already were of the belief that the stories are connected, and we thought it would make sense. According to TechCrunch , Facebook will kill off the Messenger Day brand, and merge the feature with Facebook Stories .
"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".