The Uruguay international - who has failed to make a single appearance in Ligue 1 this season - has arrived in Spain to finalise his loan move.
Lugano, 32, joined PSG in the summer of 2010 but the subsequent arrivals of Alex and then Thiago Silva have greatly restricted his chances.
Ancelotti said: “Lugano has left for Malaga. He has decided to look for a club where he could play more. It’s true that he was never playing [for us] but he has been very professional.
“It has been a good lesson for the whole team. He has always worked with professionalism, and I thank him for that. It’s easy to be a pro when you play every game – it’s more difficult when you don’t have a chance to play.
Lugano tweeted: “It would be great to be part of this project. It’s a great challenge.”