Higuain had been a regular starter and prolific scorer for Madrid up until he suffered a serious back injury last season that required surgery and left him sidelined from November until April, and since returning he has largely had to make do with a substitute's role.
With Karim Benzema the preferred choice up front for Jose Mourinho, Higuain had started only once this season going into this weekend's game, but an injury to the Frenchman gave the Argentina international a chance to shine and he took full advantage with a three-goal showing.
Speaking after the game, Higuain said: "I'm very happy. I suffered a lot to get back to playing and I'm happy to have a game like that. Also, I was able to complete the entire game, which is very good to help me recover top form.
"Mourinho congratulated me. Everybody knew that I needed this after the injury. Now I'm only thinking of enjoying it and taking it game by game."
The 23-year-old grabbed the first of the match after 17 minutes and added two more in the second half, with former Espanyol midfielder Jose Callejon also scoring against his old team-mates after coming off the bench.
The three points took Madrid up to third in the Primera Division table, one adrift of joint leaders Barcelona and Levante, and helped the team bounce back from disappointing results at Levante and Racing Santander in their previous two away games.
Higuain said on his club's website: "This victory helps us continue near the teams at the top. It was a difficult game, but very good for me to continue gaining confidence and playing time and for us to continue moving forward in a very positive manner."
He added in AS: "There wasn't any crisis, we had two bad games, nothing more. Against Espanyol it was important to win because we knew if we didn't we would have fallen further away from the leaders. Everybody did a great job."