Moyes admits he saw McTominay as an ideal replacement for Declan Rice after his sale to Arsenal.
He wrote for BBC Sport: "Lots of managers have hard luck stories about players that get away and McTominay is one of those for me because I tried to sign him for West Ham last summer.
"It was always going to be hard to replace Declan Rice with any one player when he joined Arsenal, and we were not planning to do that - we wanted to bring in a couple of midfielders instead.
"We bought two really good players in James Ward-Prowse and Edson Alvarez, so that was the cover, but Scott was certainly one of the players we had a big interest in as well.
"He is a good all-round midfielder, but to me his best attributes are arriving in the area, or the edges of it, at the right time to score or make some chances.
"McTominay was a player who I felt I needed at the time, but we didn’t quite get it over the line and he went on to score a lot of big goals for Manchester United last season instead."