The Defense Department has named a Silicon Valley veteran to fast-track the development of artificial-intelligence capabilities to be used by U.S. forces from the Pentagon to the battlefield, the agency said.

Craig Martell, who heads machine learning at San Francisco-based ride-hailing company Lyft Inc., on Monday was named as the military’s first chief digital and artificial intelligence officer, charged with accelerating the adoption of data, analytics and digital applications, the agency said.

Deputy Secretary of Defense Kathleen Hicks in a statement said the move is aimed at increasing the speed at which the military develops advanced AI, data analytics and machine-learning technology.

“Advances in AI and machine learning are critical to delivering the capabilities we need to address key challenges both today and into the future,” Dr. Hicks said.

In his role, Dr. Martell, who joined Lyft two years ago and has also led machine-learning development at software company Dropbox Inc. and Microsoft Corp.’s LinkedIn, will oversee the department’s new digital and AI office, the agency said.

Launched in February, the office is part of restructuring efforts that combine the department’s enterprisewide data, AI and cyber initiatives under one roof.

The agency last month appointed Margaret Palmieri, the founder and director of the U.S. Navy’s digital warfare unit, as the new office’s deputy chief. Until this week, Pentagon Chief Information Officer John Sherman has been standing in as its acting director.

The goal of these and other efforts, the agency said, is to kick-start digital innovation, in part by drawing lessons and best practices from the private sector.

“Craig is the industry outsider and Margaret is the Defense expert with deep knowledge and relationships inside the department,” an agency spokesperson said.

Dr. Martell was not available for comment.

Lawmakers from both parties have long criticized the federal government for failing to upgrade aging technology systems and keep pace with industry innovation.

The House in February approved a $350 billion bill aimed at boosting U.S. competitiveness with China, and other rivals, including in areas such as AI and other advanced technologies.

The Senate version of the bill, approved last month, includes specific provisions aimed at encouraging the development of homegrown digital technologies, citing both AI and quantum computing.

Eric Egan, a policy fellow at the Information Technology and Innovation Foundation, a Washington, D.C., think tank, said the Pentagon in recent years has been deliberately reaching out to the private sector for skilled tech workers and leaders—often via the seven-year-old Defense Digital Service initiative.

In bringing in Dr. Martell, he said, the Pentagon is tapping someone with specialized industry experience who can offer a fresh perspective of challenges in the AI, machine-learning and big data space.

“This appointment seems to be an effort to complement the existing expertise of DOD IT leadership,” Mr. Egan said.

Write to Angus Loten at angus.loten@wsj.com