FCA Chrysler manufacturer with most recalls, per WSJ.

A glitch in its vehicles’ cruise-control feature has vaulted Fiat Chrysler Automobiles to the No. 1 spot in a category in the U.S. most car companies want to avoid: recalls.

The Italian-U.S. auto maker launched a recall campaign in late May to address a flaw in more than five million vehicles that could prevent drivers from canceling cruise control should an “unlikely sequence of events” occur, the company said.

The malfunction risks causing a vehicle to maintain a set speed even when a motorist taps the brakes or flips a switch to turn off cruise control.

The company said it would provide updated software to fix the problem and wasn’t aware of any injuries tied to it. Company officials described the recall as a proactive move to ensure customers’ safety after it found only one driver who experienced the glitch.

Still, it is the latest in a series of recalls Fiat Chrysler has made. The company so far this year has recalled more than six million cars and trucks in the U.S. spanning nearly two dozen campaigns, according to government data.

Ford Motor Co. has the second-highest total, with more than two million vehicles recalled.

Problem CarsFiat Chrysler has recalled more vehicles annually than other car companies over the past several years.Fiat Chrysler and industrywide recalls in the U.S.Source: National Highway Traffic Safety Administration

Fiat Chrysler has recalled more vehicles in each of the past three years than any other U.S. auto maker, with 5.4 million in 2017, 8.8 million in 2016 and 11.5 million in 2015, the data show. Some of the totals include recalls of vehicles with faulty Takata Corp. air bags, which affected nearly every auto maker.

Fiat Chrysler has emerged as one of the most scrutinized companies in the wake of an unprecedented U.S. government crackdown on auto-safety practices industrywide. Revelations of flaws with General Motors Co. ignition switches linked to 124 deaths and 275 injuries, and exploding Takata air bags now tied to nearly two dozen fatalities and hundreds of injuries, led to record U.S. recalls of roughly 50 million vehicles annually for several years starting in 2014. The annual totals, though ebbing, remain at elevated levels with roughly 31 million vehicles recalled in 2017 and nearly 15 million so far this year.

Fiat Chrysler’s cruise-control action follows a recall to address more than two million of its heavy-duty and light-duty trucks with gear shifts that can inadvertently be moved from the “park” position, an action started in December and expanded in February. In October, Fiat Chrysler separately recalled more than 700,000 sport-utility vehicles with a brake defect and nearly 470,000 sedans and SUVs that can fail to deploy safety restraints designed to prevent whiplash in crashes.

Recall totals don’t necessarily reflect systemic problems at an auto maker, and Fiat Chrysler is far from the only one grappling with them. Ford recalls have cost it than $1 billion dating back to late 2016. The company recently launched a rare “do not drive” recall covering older trucks with air bags at heightened risk of exploding. Ford has said the financial charges reflect efforts to be transparent amid record recalls across the industry and don’t suggest consistent manufacturing problems, and that the company moved quickly to protect customers from risky air bags.

“It is always more positive for a manufacturer to get something dangerous off the road, even if those recall numbers are big,” said Jason Levine, executive director at the Center for Auto Safety, an advocacy group started in 1970 by Ralph Nader and Consumers Union. “That said, when you become the industry leader in something that speaks to the number of recalls, that’s rarely positive.”

The cruise-control action stemmed partly from Fiat Chrysler’s decision several years ago to start using computer analytics to spot problems before they spread, with a goal of launching proactive recalls, Mark Chernoby, the company’s chief technical compliance officer, said in an interview.

To find vehicle glitches, Fiat Chrysler’s computer system searches keywords spanning multiple databases, including consumer complaints to U.S. safety regulators, customer-service calls and repair orders from dealerships, he said.

“We’re going to be able to act upon issues much faster than we have in the past before they become an issue in the marketplace,” Mr. Chernoby said. The company found only one instance of the cruise-control glitch, but “we don’t want to take any further risk with our customers,” he said, adding that he doesn’t focus on a recall’s size when making decisions.

Mr. Chernoby predicted that the size of recalls would ultimately decrease as manufacturers use technology to find problems faster. Fiat Chrysler found the cruise-control problem many years after the system had been installed in vehicles, which led to a larger recall, he said.

Modern cars’ increased use of software also is likely to prompt auto makers to launch more recalls, he said. “The complexity of software in automobiles is becoming a much larger part of the things we have to look at and investigate and act upon,” Mr. Chernoby said.

Nevertheless, the cruise-control recall adds to the challenges confronting Fiat Chrysler Chief Executive Sergio Marchionne in what is expected to be his final year in that role. They also include stricter environmental regulations in Europe, allegations the company rigged diesel-powered vehicles to cheat on U.S. emissions tests and accusations from federal prosecutors that the company conspired with the United Auto Workers union on illegal payments to influence labor negotiations.

Fiat Chrysler has denied using illegal software to dupe emissions tests, and Mr. Marchionne and outgoing UAW President Dennis Williams have each denied that the company and union, respectively, knew of the alleged labor-related misconduct.

Fiat Chrysler has weathered fines, sanctions and high-profile litigation linked to safety practices with no sustained fallout to the company’s stock or retail sales.

Fiat Chrysler’s use of computer software to catch safety problems predates a then-record 2015 settlement with federal regulators over lapses with nearly two dozen recalls covering more than 11 million vehicles, including older Jeeps with rear gasoline tanks linked to numerous fatal fires, a spokesman said. Regulators hit the company with financial penalties twice that year for compliance lapses.

—Andrea Fuller contributed to this article.

Write to Mike Spector at mike.spector@wsj.com

RecallJoshua ValeroFCA