Di Maria, 28, said if he had not played in his side's 2-1 win over champions Chile in the Copa America he was afraid "she was going to get mad".
Argentina coach Gerardo Martino said he was unaware of what had happened when picking the Paris St-Germain forward.
"Not all people respond the same in those situations," said Martino.
Di Maria scored the opening goal before setting up Ever Banega for his side's second as Argentina, without injured captain Lionel Messi, won their opening game in the tournament in the United States.
"I am so happy because I was able to score," said the former Manchester United and Real Madrid player.
"It was for my grandmother and my family that are having a difficult time.
"In the morning when I knew what happened I knew that I would score today."
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Angel di Maria paid an emotional tribute to his grandmother after scoring for Argentina on the day she died.