Jose Mourinho's men edged a nervy affair in Croatia with the Argentina winger grabbing the only goal of the game as Marcelo saw red for simulation
Di Maria's 53rd minute goal was enough for Jose Mourinho's side, who were made to sweat in the latter stages of the game when Marcelo received a second yellow card for simulation 17 minutes from time.
The Spanish club nearly took the lead early on when Cristiano Ronaldo sprung the offside trap to latch onto the end of Xabi Alonso's chipped through ball. However, the Portuguese dragged his effort wide of goal from 15 yards.
Mourinho's men then created another fine opportunity with the crossbar thwarting Karim Benzema. Di Maria did well to beat Luis Ibanez to the ball which broke to the French striker in the Dinamo box before sending his shot off the top of the woodwork.
Dinamo were bright in the opening half hour yet the away team should have taken the lead. Benzema's darting run into the box saw the Frenchman slide the ball to Di Maria, who saw his close range effort blocked by the legs of Ivan Kelava, with the custodian then superbly tipping Mesut Ozil's follow-up effort over the bar.
The home side created their first real opportunity of the game in the 34th minute when Jerko Leko slid the ball through to Ante Rukavina, who could only strike it straight at Iker Casillas.
Madrid started the second half brightly and scored the opening goal of the game on 53 minutes. After some neat build-up play, Marcelo found Di Maria on the right side of the penalty area and he blasted the ball into the top corner, with the keeper helpless.
Only a minute later Sergio Ramos slid Ronaldo in on goal, however, the Portugal international's low effort just inside the box was turned around the post by Kelava.
In the 73rd minute Mourinho's men were dealt a blow when Marcelo received his second yellow card. The Brazilian made his way into the Dinamo box and threw himself to the ground in the hope of winning a penalty. However, the referee gave the 23-year-old his marching orders.
Dinamo pressed forward in the final stages of the game but were unable to muster a decent effort on goal as Madrid picked up all three points.
The Spanish giants return to Liga action on Sunday when they travel to Levante.