Lingard had a successful loan spell with West Ham in the second-half of last season and was rumoured to be joining the Hammers on a permanent deal this season.
But Moyes has revealed the London-based club were nowhere near the permanent signing of Lingard.
"Ole made it quite clear to me early in the transfer window that he wanted to keep him," said Moyes. "So I knew pretty early that he would be staying at Manchester United.
"I was hearing all the stuff but I had a private conversation with Ole who made it clear he was staying.
"I can't talk about players at other clubs because that's not the way we do it.
"But because Jesse was part of our club for a while, I think all I can say is that he made a massive contribution to the team, both on the pitch and off the pitch. We really enjoyed having him.
"I hope in many ways Jesse will look at that time and how well the players treated him and made him welcome, that Jesse will look at that as well. So it may change.
"He was great for us. But simply the manager told me he was keeping him and when that happens, I believe the manager - and that's the way it went."
West Ham will be hoping to record a win over Ole Gunnar Solskjaer's side when they visit Old Trafford on Sunday.