Mr Scott, 47, will become the conglomerate's deputy chief executive effective immediately and will join the board as managing director after the annual meeting in November. He will continue to oversee Wesfarmers' industrials division until July 1 2017.
The announcement on Tuesday follows widespread speculation late last year that Mr Scott had been tapped to succeed Mr Goyder, beating several other candidates including finance director Terry Bowen and former Bunnings boss John Gillam, who resigned in December.
Mr Goyder denied at the time that Mr Gillam had resigned because he had been told he had missed out on the top role.
While Mr Scott's appointment as group managing director is no surprise, the timing of the handover is earlier than expected.
Mr Goyder, 57, was widely expected to retire in 2018, after 13 years at the helm, giving his successor 12 months to learn the ropes.
Wesfarmers was expected to unveil its succession plan on Wednesday, when the group reports December-half results.
Analysts expect a $260 million turnaround in coal to counter weaker earnings in food, liquor, fuel and convenience and losses at Target.
Mr Scott, a former Olympic rower, has been moved through several senior roles at Wesfarmers during the past few years to prepare him for the CEO's role and better understand every facet of the business.
Mr Scott joined Wesfarmers in 1993 before moving into investment banking, where he held various roles in corporate finance and mergers and acquisitions with EY and Deutsche Bank in Australia and Asia. He rejoined Wesfarmers in 2004 in a commercial role in business development before being appointed managing director of Wesfarmers Insurance in 2007.
After six years running insurance, Mr Scott was appointed finance director of Coles in February 2013, managing director financial services in October 2014, and director of Wesfarmers' industrials division, which includes chemicals and fertilisers, industrial and safety and resources, following a management restructure in 2015.
As group managing director Mr Scott will oversee a conglomerate with a market value of $48 billion, sales of $66 billion and interests in retail (Coles, Bunnings, Kmart, Target, Officeworks and Homebase in the UK), coal, chemicals, energy and fertilisers and industrial and safety.
Wesfarmers shareholders have described Mr Scott as "very capable", with good people-management skills, but say he lacks hands-on retail expertise.
They believe his appointment is another sign that Wesfarmers is more likely to retain its conglomerate structure rather than divesting all its non-retail assets.
"They want someone who has the skills to run a diversified set of businesses with a diversified set of individuals," one retail analyst said last month.
Wesfarmers is currently considering expressions of interest for its coal operations, which analysts believe could be worth as much as $2.4 billion following as surge in coal prices.
Wesfarmers chairman Michael Chaney said Mr Scott had shown himself to be an outstanding executive, demonstrating leadership and commercial capability in key roles.
Mr Chaney said Mr Scott's appointment continued Wesfarmers' unbroken tradition of appointing its chief executives from within. Mr Scott will become Wesfarmers' eighth managing director and chief executive in 103 years.
"Rob has a proven capability to deliver improved business performance and to lead change through building great teams around him," he said. "Importantly, he is deeply grounded in Wesfarmers' culture and disciplined focus on sustainable shareholder returns."
Mr Scott said it was an honour, privilege and great responsibility to be appointed to the role.
"The Wesfarmers approach to business is ingrained in me and provides our teams with a platform to innovate and develop world class businesses," he said.
"Building high performing teams and maintaining a disciplined approach to capital allocation will be my focus as we position the Group for the future."
Mr Chaney paid tribute to Mr Goyder, who joined Wesfarmers in 1993 and succeeded Mr Chaney as managing director in July 2005.
During Mr Goyder's reign the company's market value has risen from $15 billion to almost $50 billion - buoyed by the $20 billion acquisition of the Coles Group in 2007.
"Richard has been an extraordinary leader at Wesfarmers and is a highly respected and admired leader of the Australian business community," Mr Chaney said.
Mr Goyder said his decision to retire at the end of this year had not been easy.
"I continue to enjoy the challenges of leading this outstanding and diverse company and appreciate the opportunities it has given me. I look forward to working with Rob on a seamless transition in the months ahead," he said.
Sydney-based Mr Scott, a father of two, will return with his family to his home town of Perth to take up the new role.