BERLIN—Shares of Daimler AG fell almost 5% on Monday after the maker of Mercedes-Benz luxury cars issued a profit warning late Sunday related to a government recall of vehicles suspected of manipulating diesel emissions.

Daimler said it would take a one-time charge against earnings in the second quarter totaling hundreds of millions of euros related to ongoing diesel investigations and other unspecified issues.

The move marks the company’s third profit warning in a year and is the first obstacle that the company’s newly minted chief executive, Ola Källenius, will have to resolve to combat a creeping erosion of investor confidence.

“Daimler needs to execute better,” said Arndt Ellinghorst, an auto analyst with brokerage Evercore ISI. “At some stage when one-time items become the norm, credibility suffers.”

The hit to quarterly earnings forced Daimler to lower its full-year earnings outlook on cars and vans because of an expected increase in expenses relating to what it defined as ongoing governmental proceedings and measures regarding Mercedes-Benz diesel vehicles.