The England striker scored his first from just inside the Hammers half in the eighth minute in the Red Devils' 2-0 victory at Upton Park.
"I wanted it to go straight in and I didn't know if it was going to bounce under the bar or over the bar," Moyes told Sky Sports News. "Thankfully, though, it did go in.
"It was a brilliant goal, superb technique and in Wayne we have a player who is capable of doing all those sorts of things on a football pitch. It was like [David] Beckham's goal [against Wimbledon in 1996] for sure. Wayne tries it, that's the thing.
"They are saying in the dressing room he's tried that 20 times and it's never worked, but it did today. Such great awareness. I think how clean Beckham hit it but I think for Wayne to take it on the volley along with his timing, it's a great goal."
United are currently seventh in the league table with 51 points from 30 matches.