Moyes had a bid accepted by Cardiff and thought he had got his man, only to lose him to Arsenal.
And Ramsey is set to line up for the Gunners against Moyes' new team at Old Trafford on Sunday, having been in superb form so far this season.
"He has played really well," said Moyes."He now sees himself as one of their really important players and has not let them down with the goals he has scored.
"Yes, I was very close to signing Aaron when I was at Everton. I had him and his family in my house but Arsenal beat me to it."
United decided not to pursue Ozil
Mesut Ozil is also likely to be in the Arsenal side on Sunday, having made a successful switch from Real Madrid, and Moyes said United could also have been in the mix for the German's services but decided not to get involved.
"We weren't close to buying him but something was mooted," said the United boss.
"We had Shinji Kagawa and Wayne (Rooney) and people of a similar ilk, so it wasn't quite what we required at the time. We were looking at different positions."
Moyes did buy Marouane Fellaini from his former club Everton for £27.5m but the midfielder has yet to score for his new team and was sent off during the midweek draw at Real Sociedad.
Live Super Sunday
Man Utd vs Arsenal
November 10, 2013, 4:00pm
However, Moyes says he has been forced to use the Belgian more than he was planning to and that the slow start is understandable.
"We had to put him in earlier than we thought," Moyes explained.
"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."
Moyes also believes the Italian referee Nicola Rizzoli that sent Fellaini off should be the one under the microscope if Ashley Young dived to win a penalty in Spain on Wednesday.
Young has been castigated for his behaviour in the Champions League encounter with Sociedad, when he went down under minimal contact from Markel Bergara.
Although top Italian referee Nicola Rizzoli was right on top of the incident and elected to show a yellow card to Bergara, other observers have been less impressed.
Ray Wilkins, said the antics had been "pathetic", whilst Dietmar Hamann labelled the winger "worse than Luis Suarez".
A long-time opponent of diving, Moyes has previously called for retrospective action to be taken against culprits and censured Young earlier this season when he was booked for simulation against Crystal Palace.
On this occasion though, he has taken a different stance.
"If you didn't think it was a penalty, you should say the referee got it wrong not the player," said Moyes.
"He refereed the Champions League final so you are expecting him to be as qualified as anybody. He was two yards away."
Instead, Moyes believes Young is being attacked on reputation.
"I do think a little bit of that," he said. "The referee was two yards away from it and gave a penalty. If you need to talk to anybody, you should ask the referee.