McEwan, 56, had been tipped to take the reins after predecessor Stephen Hester was ousted by the government in June. He will take over in October with the job of completing RBS's restructuring, ensuring its shares rise above the government's break-even price so the stake can be sold.
His promotion comes less than a year after he arrived to run RBS's retail arm.
British Finance Minister George Osborne said McEwan had impressed with his vision of RBS, 81 percent owned by the government after a 46 billion pound ($70 billion) bailout during the 2008 financial crisis, as a "strong, UK-centered corporate bank", focused on supporting the UK economy.
"I think he'll provide the leadership RBS needs as the bank puts the mistakes of the past behind it, and the government seeks to get the best value for the taxpayer from the money the last government put into the bank," Osborne said.
Chairman Philip Hampton, who has overseen the search for Hester's successor, said McEwan had "emerged as the best candidate" and was the only person to be offered the job after the bank had considered internal and external options.
Hampton said he didn't expect McEwan's appointment to mark a change in strategy, pointing out RBS had already refocused as a retail bank under Hester's stewardship, shrinking its investment bank to account for 20 percent of operating profit compared with 60 percent prior to its rescue.
Hester oversaw a mammoth restructuring, shedding some 900 billion pounds of non-core assets, but the bank has come under pressure from lawmakers to further slim its investment activities.
Hester resisted the demands, saying the investment bank provided crucial services to RBS's corporate clients, and the issue caused friction with Britain's finance ministry.
The government wants RBS to be less complex and more like its part-nationalised rival Lloyds Banking Group, which is heavily focused on domestic lending.
RBS shares are valued at 407p on the government's books but are trading well below that level. A sale of the government's shares is therefore likely to be at least a year away, unlike at Lloyds, where the government is set to start selling its shares soon.
RBS shares were down 4 percent at 320 pence by 0955 GMT, having rallied 5 percent on Thursday after reports McEwan would be appointed and strong results from Lloyds.
McEwan was named as RBS said it swung to a pretax profit of 1.4 billion pounds ($2.1 billion) in the six months to the end of June, from a loss of 1.7 billion a year before.
The result marks the bank's first two consecutive quarters of profit since its 2008 bailout and RBS said it expects its restructuring to be largely done by the end of 2014.
McEwan joined RBS as CEO for UK retail in September from Commonwealth Bank of Australia <CBA.AX> and is considered a safe, politically acceptable choice who will increase the bank's focus on retail and commercial banking.
He is expected to continue slimming down its investment bank, as wanted by many politicians and regulators.
"It's really important for the UK economy to have this bank back up and running," McEwan said. "It's a major responsibility for me to guide this organisation to focus very strongly back on our customers and I'm looking forward to that opportunity."
He will be paid an annual salary of 1 million pounds, less than the 1.2 million Hester received. McEwan said he did not want to be considered for an annual bonus for the remainder of 2013 or for 2014.
"We take the swift replacement as a signal of the government's urgency to take RBS closer to the end game when the Treasury can exit its holding profitably," said Chirantan Barua, analyst at brokerage Bernstein.
RBS said its capital strength continues to improve and expects to reach a core capital ratio under full Basel rules of more than 9 percent by the end of this year.
It took an extra 185 million pound provision to compensate customers for the mis-selling of payment protection insurance, taking its total bill to 2.4 billion pounds.