McCann won the business after a pitch that kicked off at the end of December last year.
It will create campaigns to run across Europe, including the UK, where HTC spends £7 million on advertising.
Recent international and UK work was created by Amp, which was appointed to the brand's global roster last year. Amp remains on the roster, while Deutsch will continue to handle advertising for HTC in the US.
McCann's creative work will carry HTC's "quietly brilliant" tagline and continue to use the "Here's an idea" theme and the "doodling" style of last year's animated ad that depicted HTC product designers at work.
HTC is planning a series of product launches throughout the year, each developed with a particular lifestyle in mind. Although HTC's smartphone sales almost doubled last year, the company dropped to fifth place in the global smartphone market earlier this month with a 7.1 per cent market share.
Vladimir Malugin, the HTC EMEA marketing director, said: "McCann chose a slightly controversial route for its pitch but its conviction, creativity and understanding of the HTC brand and our values allowed it to pull it off."