King becomes the 28th AFL/VFL senior coach of Melbourne, who chose the Geelong assistant ahead of former Collingwood coach Buckley and other shortlisted contenders including James Kelly, Daniel Giansiracusa and Brendon Lade.
Collingwood assistant Hayden Skipworth was also in the running, but he pulled out before interviews were conducted earlier this week.
Buckley was the hot favourite to land the Demons role, but he also publicly expressed he was still weighing up what was the best fit for his future.
The 53-year-old is now the frontrunner to become the inaugural coach of the Tasmania Devils, who are on track to join the AFL in 2028.
King was taken to hospital in September last year after collapsing while mid conversation at Geelong training.
The 46-year-old was in the running for the head coaching role at West Coast at the time, with Andrew McQualter eventually winning out.
King, who is Geelong's midfield coach and previously served as Gold Coast's caretaker coach for seven matches after Stuart Dew's sacking in 2023, will remain at the Cats until the end of their finals campaign.
"Melbourne has a rich history, and I feel very humbled to be given this opportunity at one of the oldest professional sporting clubs in the world," King said in a statement.
"I began my AFL career in 1996 and have experienced it all across the past 30 years.
"I'm excited to bring my experience to the club and see what we can achieve, together, from next season and beyond.
"I can't wait to meet the playing group, my fellow coaches, the staff, and the Demon faithful, and start building towards 2026."
Goodwin, who led Melbourne to their 2021 flag, was axed in August with three rounds remaining in the season following a poor run of results over the past two years.
King has now been handed the responsibility of not only turning around Melbourne's flagging fortunes, but also convincing stars Christian Petracca and Clayton Oliver to stay.
The Demons started 2025 with five straight losses, ultimately finishing 14th with a 7-16 record.
It marked their worst season since finishing 17th in 2019 with a 5-17 return.
The coaching selection panel that recommended King comprised of Melbourne president Brad Green, chief executive Paul Guerra, director Steven Smith, football manager Alan Richardson, former Essendon captain Jobe Watson, Melbourne Storm football director Frank Ponissi and human resources executive Meahan Callaghan.
"Steven has elite football IQ and a deep understanding of the game," Green said.
"He is highly competitive, places a strong focus on connection, and has a coaching philosophy we think our players will thrive under.
"During the appointment process, it became more and more clear that Steven was the ideal candidate."
King played 193 games for Geelong across 12 seasons, including the club's 2007 grand final win, before rounding out his 240-game AFL career with St Kilda.
The talented ruckman retired in 2010 then had two seasons coaching at the Saints before joining the Western Bulldogs.
The highlight of King's 10-season stretch at the Dogs was their 2016 premiership.
King took a senior assistant coaching role at Gold Coast in 2022 before linking up with the Cats at the end of the 2023 season.
"We are thrilled to see Steven get this opportunity ... he is an excellent coach and our players have benefited from his experience and knowledge," Geelong football manager Andrew Mackie said.