General Motors Co. and Lyft Inc. within a year will begin testing a fleet of self-driving Chevrolet Bolt electric taxis on public roads, a move central to the companies’ joint efforts to challenge Silicon Valley giants in the battle to reshape the auto industry.

The plan is being hatched a few months after GM invested $500 million in Lyft, a ride-hailing company whose services rival Uber Technologies Inc. The program will rely on technology being acquired as part of GM’s separate $1 billion planned purchase of San Francisco-based...