Harding, who is the paper's business editor, joined The Times in August 2006 from the Financial Times where he had worked for almost 12 years.
Independent national directors of Times Newspapers Holdings Ltd, who must agree the appointment of Times Newspapers editors, have expressed their approval of Harding's promotion.
Harding will assume the post next week when Thomson starts his new role as publisher of Dow Jones and The Wall Street Journal.
At the FT he had been the paper's Washington's bureau chief, media editor before that and a correspondent in China where he opened the Shanghai bureau for the FT, which made the paper the first European newspaper to open an office in the city since the 1949 revolution.
Harding first joined the Financial Times in 1994 as a corporate reporter having previously spent time as a speechwriter in the office of Koichi Kato, then Japan's chief cabinet secretary, and in the Japan unit of the European Commission.
Rupert Murdoch, chairman and chief executive of the News Corporation, said: "Under Robert Thomson's leadership, The Times has gone from strength to strength and I am confident James is the editor to build on Robert's success.
"James has enjoyed an outstanding career as a correspondent and editorial executive. His experience working in Britain and around the world equips him ideally to take on the job of editing The Times."
Confirmation of his appointment, which had been speculated, follows a busy day of activity within the Murdoch empire that has seen new jobs for James Murdoch, Thomson and Les Hinton, who takes up the chief executive's role at Dow Jones.
James Murdoch, incoming chairman and chief executive of Europe and Asia, News Corporation, said: "James is a tremendous journalist and executive -- there is no better choice to lead The Times in this exciting period. I've known, respected, and trusted James for years, and I'm looking forward to working with him."
Thomson said: "I have cherished my time at The Times, which will be in the very capable hands of James Harding, one of the most outstanding British journalists of his generation."
Harding said: "Under [Thomson's] leadership, The Times has led the way in trusted news and challenging opinion, while innovating in design, internationalising its reach and driving a new era of Times journalism online."