It marked Moyes' last home game in charge and he said: "I needed to win after last week, that is for sure. We weren't so good in the first half but we altered it and we needed the goal which took the stuffing out of Luton.
"George Earthy came on and got the goal which is great for the boy, he's a local boy and a fan of the club.
"I was subdued today because I knew what the other manager was going through. The effort Luton have put in has been huge, they have kept it going until the last day of the season. I feel bad for Rob Edwards today.
"There was huge emotion there for me, to be a manager of such a great club. When you think you've done a good job it's great to see people applaud you and we have done a pretty good job here.
"We have given them some really big nights and there has been progress made. I'm looking forward to seeing the next steps for West Ham."