Audley Group will turn the main building into a retirement complex; Berkeley Homes will put up 168 homes in the grounds.
The net sale price was approximately £50m.
The government bought Northcote House in 1947 and used it as a training centre for civil servants until 2012. In recent years, the building had been used as a conference centre and hotel.
As part of the development of the site, the listed building will be restored to form the centre of the Audley retirement village with apartments both within the main building and on the surrounding land.
The further 168 new homes built by Berkeley in the wider grounds will include 38 affordable properties.
Cabinet Office minister Lord Agnew said: “This is a concrete example of how reducing the size of the government estate can both generate money for vital public services and provide much needed new homes.
“The restoration of the listed building at the heart of the development and opening up of its surrounding parkland for use by the public will also benefit the local community for generations to come.”
As part of the government’s drive to reduce the size of its central estate, it is now 30% smaller than it was in 2010, by Cabinet Office definitions. In the past year alone, 339 former government buildings have been sold – returning £2.1bn to the Treasury.