Van Nistelrooy, who turns 35 on July 1, has agreed a one-year contract and will be presented to media and the club's supporters at their La Rosaleda stadium.
''Throughout my career I have been with many clubs and have shared a dressing room with world-class players,'' Van Nistelrooy told Marca. ''I feel very proud and happy to be here.''
Backed by Qatari businessman Sheikh Abdullah al-Thani, ambitious Malaga are hoping to compete higher up the league, having come off a season in which they finished 11th.
Van Nistelrooy, who came to international prominence with PSV Eindhoven, moved to Manchester United in 2001 and was a big hit at Old Trafford. He departed for Real Madrid in 2006 and had three-and-a-half seasons at the Bernabeu, before joining Hamburg on an 18-month deal.
With that contract coming to an end this summer, he joins Malaga on a free transfer.