The acquisition was done in an off-market deal, it said.
"The transaction is in furtherance of the Government's objective to combine the various central public enterprises to give them capacity to bear higher risks, avail economies of scale, take higher investment decisions and create more value for the stakeholders and create an oil major which is able to match the performance of international and domestic private oil and gas companies," it said.
The price paid is higher than Rs 396.50 closing price of HPCL on the BSE.
The transaction will help the government cross its annual sell-off (disinvestment) target for the first ever time.
ONGC has borrowed money from a clutch of banks to fund the deal.
Through this acquisition, ONGC will become India's first vertically integrated 'oil major' company, having presence across the entire value chain. The integrated entity will have advantage of having enhanced capacity to bear higher risks and take higher investment decisions etc.
In this process, ONGC has acquired significant mid-stream and downstream capacity and will attain economies of scale at various levels of operations.
With a turnover of Rs 2134.89 billion and profit of Rs 65.2 billion during 2016-17, HPCL ranks at 384th in Fortune Global 500 and 48th in Platts 250 Global Energy Companies.
HPCL markets around 35.2 million tonnes of petroleum products with a market share of about 21 per cent and is number one lube marketer in the country. It has refineries in Mumbai and Visakhapatnam and a joint venture refinery at Bhatinda.
It owns the biggest Lube refinery in India and the second largest cross country product pipeline network of about 3,500 km. HPCL has a vast marketing network spread across the length and breadth of the country with terminals, depots, LPG bottling plants, lube blending plants, aviation fuel stations and around 15,000 petrol pumps.
ONGC is the largest producer of crude oil and natural gas in India, contributing around 70 per cent of domestic production.