The forward, who has spent the best part of a decade with the Dons, had the remainder of his contract at Pittodrie cancelled and moves to James McPake’s side on a one and a half year contract.
The 34-year-old goes straight into the squad for Wednesday night’s bottom of the table clash with St Johnstone.
McGinn played more than 350 times for the Dons – 299 from the start, either side of a short stint in South Korea, and has won 67 caps for his country, so far, the last coming in October last year.
Stephen Glass says the departing forward had been an “outstanding servant” but was moving for more game-time.
"He is now at an important stage of his career where he wants the opportunity to play every week and unfortunately, we are not in a position to offer him that at the moment.
“Niall’s determination will prove him a success at his next club, and he goes with our very best wishes.”
McGinn, who previously played for Derry City, Dungannon Swifts, Brentford and Celtic, fills a striking vacancy at Dens Park following the departure of Jason Cummings to Australia.
The former Hibs and Rangers forward has been on the fringes of the Dark Blues side this season and has signed for Central Coast Mariners in the A-League after flying Down Under at the weekend.
Dundee have already signed Jay Chapman, while Declan McDaid has returned from his loan spell at Falkirk.