The first goal came after just 14 minutes when McGinn picked the ball up outside the area before firing a fine effort past Ben Williams.
McGinn went for goal from range again in the 39th minute, but this time his effort was not as successful as he dragged it wide of the post.
The visitors came close to a second just one minute later, however, and once again it was McGinn who threatened as he finished a fine move with a curling effort that came back off the post.
The second goal came shortly after the hour mark as Rooney made his way down the right flank before crossing the ball for McGinn to power a header home.
That proved to be the killer blow for the hosts, who were unable to pull a goal back in the closing stages as the Dons moved three points clear in second place.