The Mexican forward smashed in three goals to give the former Manchester United boss his first taste of victory in La Liga and lift the club three points above the relegation zone
Moyes' reign at Anoeta began with a dour 0-0 stalemate at Deportivo La Coruna last Saturday, but Vela was on hand to inspire the Scot's team this week.
It took just three minutes for Mexico international Vela to score the first goal of Moyes' tenure, as he met Carlos Martinez's cross from the right with a bullet header.
By no means did Sociedad have it all their own way, though, with Elche's highly rated Brazilian forward Jonathas causing all sorts of problems for Gorka Elustondo and Ion Ansotegi at centre-back.
But Moyes' men looked lethal on the counterattack and Vela netted his second of the game at the end of an incisive breakaway just after the half-hour mark, finishing low after a brilliant lofted pass from captain Xabi Prieto.
And Vela again proved a thorn in the visitors' side early in the second half, the former Arsenal man completing his hat-trick in the 53rd minute by poking through a defender's legs and into the bottom-left corner.
The win lifts Sociedad three points above the Liga relegation zone, while Elche remain second from bottom.