"I'm delighted to finally sign on the dotted line. I can't wait to hit the ground running and make my debut in the blue shirt. I can't wait to show what I can do to the fans in Yankee Stadium," Mackay-Steven said in a statement on the team's website.
"The lure of playing in America and in MLS is really attractive to me. It's always been a draw for me, it's hard to say no. I can't wait to get started."
The left-footed Scottish player will be eligible to play for NYCFC's meeting with Orlando City on July 10 after the secondary transfer window opens.
"Gary brings the qualities that this club is looking for in an attacking player. He's very good on the ball and likes to run at players in 1 vs. 1 situations," NYCFC manager Domenec Torrent said.
Before returning to Aberdeen in 2017, the 28-year-old enjoyed a two-and-a-half-year spell in Glasgow, where he helped Celtic win the SPL title three times.
His new club sits sixth in the Eastern Conference with 23 points after 14 matches.