The Massacre of the Innocents by Flemish Old Master Peter Paul Rubens shocked the art world when it was sold at auction for £49.5m in 2002.
The painting, which dates from 1610, was largely unknown for many years and was even attributed to another artist.
It will be hung alongside Rubens' Samson and Delilah painting, which was sold 20 years ago for £2.5m.
The Massacre of the Innocents, which depicts Roman soldiers slaughtering children on King Herod's orders, was expected to fetch between £4m and £5m.
But after frenzied bidding at Sotheby's in London, the final price paid by newspaper owner David Thomson was £49,506,650.
He has loaned the painting to the National Gallery for up to three years and then it will be displayed at the Art Gallery of Ontario, in Toronto, Canada.
David Jaffe, senior curator at the National Gallery, said: "This display captures Rubens' exuberance and genius, in an unprecedented show of fiery brushwork and spine-chilling imagery."
Gruesome
The painting was the third-most expensive at any auction in the world, subject to exchange rates at the time of sale, and the dearest at a British sale.
The work was identified just weeks before by Sotheby's expert George Gordon.
It was originally assumed to have been painted by Jan van den Hoecke, a follower of Rubens.
The family that owned it had kept it hidden because of the gruesome scenes it depicts.
A spokeswoman for the National Gallery said: "It is the first time in well over 100 years that the two paintings will have hung together."