The sale of Ausgrid will raise A$16.189 billion (£10.137 billion) for the state which will help fund infrastructure projects, premier Mike Baird said.
IFM Investors and Australian Super made an unsolicited bid for the network last month.
NSW treasurer Gladys Berejiklian said the proposal was "thoroughly assessed by government agencies and financial advisers, within the strictest probity requirements, and found to be unique and delivering value for money".
"This is an outstanding result and it is great to see a completely Australian consortium investing in this asset," Berejiklian said.
As the consortium is all-Australian, there is no need to seek approval from the Foreign Investment Review Board, she said.
Australia's price commissioner has signed off on the transaction, and the consortium has also signed a guarantee that says total Ausgrid network charges will be lower in 2019 than they were in 2014, Baird's statement said.
The NSW government will retain 49.6% of Ausgrid and will have an ongoing role as the lessor of the business and an investor. In addition, the state will continue its roles as licensor and safety and reliability regulator of Ausgrid. Ausgrid will continue to be regulated by the Australian Energy Regulator which determines network prices, it said.
Infrastructure expert Margaret Cole of Pinsent Masons, the law firm behind Out-Law.com, said: "Confirmation of the sale of Ausgrid is good news for further infrastructure development in New South Wales, as it will provide a substantial boost to the NSW state government’s funds available for such developments. It will not be without controversy however, being structured as an unsolicited bid and hence not the result of a competitive process, as is already evident in press reports."
"It also does not provide any clarity around foreign investment rules for international investors who are interested in other assets, including the upcoming Endeavour sale," she said.
Endeavour Energy is NSW's electricity distributor. Berejiklian told the Sydney Morning Herald that the government will begin the sale of Endeavour by the end of this year.
In August the federal government blocked a planned sale of a 50.4% stake in a 99-year lease to one of two Chinese bidders. Treasurer Scott Morrison said at the time that he told both bidders that in his "preliminary view" their proposals are "contrary to the national interest, in accordance with the required provision on the grounds of national security".
The national security concerns were principally around the power and communications services that Ausgrid provides to business and government, Morrison said.
Australia "will continue to welcome foreign investment that is not deemed contrary to our national interest", Morrison said.
The bidders were Chinese government-owned State Grid Corporation and Hong Kong-based Cheung Kong Infrastructure, and the deal was expected to be worth around AU$10 billion (£6 billion), according to the Sydney Morning Herald.