Telsa will build a 100-megawatt hour lithium-ion battery, the world's largest, in South Australia within 100 days or it's free.
Mr Musk and the South Australia government reached agreement on the deal to provide a more reliable source of power to the state, which has been battling power problems since a statewide blackout in September 2016.
South Australian Premier Jay Weatherill confirmed the deal yesterday "as part of the contractual arrangement".
Tesla, which builds luxury electric cars, would build the 100MWh battery to store energy from French renewable company Neoen's Hornsdale Wind Farm near Jamestown which is still under construction.
The project was set to be in place before summer.
Mr Musk's '100 days or it's free' pledge starts once the grid interconnection agreement has been signed.
The Government said the battery would put the state at the forefront of global energy storage technology.
The battery will stabilise the network at all times and will provide back-up power if there is a shortfall.
Mr Musk said the promise could leave the company significantly out of pocket if it failed to deliver to deadline, with estimated costs of $50 million or more.
"There is certainly some risk, because this will be the largest battery installation in the world by a significant margin ... the next biggest battery in the world is 30 megawatts," Mr Musk said.
"You can essentially charge up the battery packs when you have excess power when the cost of production is very low ... and then discharge it when the cost of power production is high, and this effectively lowers the average cost to the end customer," Mr Musk said.
"It's a fundamental efficiency improvement for the grid."
Mr Musk initially made the 100-day pledge via Twitter in March, after being alerted to South Australia's power woes by billionaire tech guru Australian Mike Cannon-Brookes, who co-founded software company Atlassian.
Tesla will get the system installed and working 100 days from contract signature or it is free. That serious enough for you?— Elon Musk (@elonmusk) March 10, 2017
legend! ☀️ You’re on mate. Give me 7 days to try sort out politics & funding. DM me a quote for approx 100MW cost - mates rates!— Mike Cannon-Brookes (@mcannonbrookes) March 10, 2017
In January this year Telsa unveiled a similar battery storage farm in southern California.
It's got 396 fridge-sized batteries that are capable of powering 15,000 homes, according to The New York Times.
Telsa announced the California project on September 15, 2016 and said it would be delivered in three months.
It was officially opened on January 30, 2017.
Mr Musk said the South Australian battery project would be "three times further than anyone has gone before".