Ramsey has finally shown why Arsene Wenger was so keen to snap up the Wales midfielder from Cardiff in 2008 with a string of scintillating performances this season.
United had a ?5million bid for Ramsey accepted, and so did Everton.
Indeed, Moyes thought he had got his man, only to discover Ramsey wanted to join Arsenal instead.
"I was very close to signing Aaron," Moyes told reporters ahead of United's meeting with Arsenal at Old Trafford on Sunday.
"I had him and his family in my house but Arsenal beat me to it.
"He has played really well. He now sees himself as one of their really important players and has not let them down with the goals he has scored."
Ramsey has netted 11 times this season and most recently scored the winner on Wednesday when Arsenal became the first English team to beat Borussia Dortmund away from home in the Champions League.
His form is in stark contrast to that of Marouane Fellaini, who has failed to make much of an impression with United since his ?27.5million switch from Everton in the summer.
Fellaini was red carded during the midweek draw with Real Sociedad and has still to score for his new club.
Yet Moyes believes there is an explanation for the Belgian's slow start.
"We had to put him in earlier than we thought," said Moyes.
"He was a little bit behind and my plan was to put him in much slower and give him a chance to settle in.
"But we had to put him in and he wasn't quite ready.
"I actually thought he played well in Sociedad.
"We could have taken him off after the first booking but given how close the referee was to the incident he must have got it right."
Fellaini turned out to be Moyes' only significant summer signing, although he could have signed Mesut Ozil, having revealed he was offered the German during the summer.
Interest from United was reported at the time, although it now transpires Moyes was not that bothered.
"We weren't close to buying him," said Moyes.
"Something was mooted but we had Shinji Kagawa and Wayne Rooney. It wasn't something we required at that time and we were looking at different positions."
Source: PA
Source: PA