Many users expressed anger online that ad banners had started appearing above the touchscreen keyboard while they were typing.
HTC's latest smartphones are sold with a third-party keyboard called TouchPal pre-installed as the default.
The free version of TouchPal does usually show ads, but HTC said it was unintended on its devices.
HTC phones run the Android operating system, which lets people download and install a variety of third-party keyboards so that they can customise their typing experience.
Android comes with a default touchscreen keyboard built-in, but many companies including Google and BlackBerry design their own.
Other phone makers, including HTC, pre-install a third party keyboard such as Swiftkey or TouchPal.
Criticising the software, TouchPal user Selina wrote: "It used to be good but recently ads keep popping up when I'm in the middle of something and it's really inconvenient and annoying."
Others were less kind.
"I am done with your junk app forever," said Ramtin.
"The way you show your junk ads whenever I want to write something is the most stupid and annoying way of advertising ever. You don't care about anything other than money."
Some reviewers said they would switch from TouchPal and download a different keyboard from the Google Play app store.
In a statement, HTC said: "This is absolutely not the experience we intended and we're working to immediately fix the error and remove the ads as quickly as possible."
Responding to a review on Google Play, TouchPal said an issue with its server was responsible. However, many people remain critical of the company.
"Ads should go nowhere near a keyboard app," wrote intripletime on social media site Reddit.
"They knew what they were doing."