Di Maria spent four seasons at the Santiago Bernabeu, winning a LaLiga crown and Champions League title among numerous other trophies.
The Argentina international spent a campaign at Manchester United before arriving at his current club Paris Saint-Germain in 2015.
Despite his history at Madrid, Di Maria, 29, said he would play for Barca if the opportunity presented itself.
“My relationship with Madrid is finished because my cycle there ended,” he told So Foot.
“Frankly, I wouldn’t have a problem to play at Barca, to the contrary.
“The only club I couldn’t play for is Newell’s Old Boys because I am a fan of Rosario Central.”
Di Maria and PSG face Madrid in the Champions League on Wednesday.