Officials in Colorado are planning a public-road test of battery-charging technology capable of powering electric trucks while they drive.

In the pilot project, believed to be the first of its kind in the U.S., vehicles equipped with “receiving coils” will draw power from another coil buried in the road. The Colorado Transportation Department and infrastructure developer Aecom Inc. are scouting potential sites, including busy roads near Denver International Airport, with a goal of launching in 2018.

Heavy-duty electric trucks remain a rare sight on highways, in part because they need to make frequent stops to recharge and must carry heavy, expensive batteries. The pilot’s developers say their goal is to extend the distances electric trucks can drive and reduce the bulkiness of in-vehicle batteries.

“It’s one of those, ‘if you build it, they will come’ things,” said Peter Kozinski, director of Colorado’s RoadX program, a state fund aimed at using new technologies to ease congestion and improve road safety.

Mr. Kozinski also recently worked with Anheuser-Busch InBev SA and Uber Technologies Inc.’s autonomous trucking unit Otto on a beer delivery the brewer hailed as the world’s first commercial shipment by a self-driving truck.

Top Logistics News Get the latest logistics and supply chain news and analysis via an email newsletter. Sign up here

Under terms reached earlier this week, RoadX will pay Aecom $200,000 to help identify a location for the pilot, design the in-motion charging grid and find electric-truck partners to participate in the testing phase. They will license the technology from researchers with the Sustainable Electrified Transportation Research Center, or SELECT, at Utah State University, who have been conducting their own tests with a bus on a closed loop track.

The Colorado project is slated to begin construction by the end of 2017 and start testing by the end of 2018. Data collected during the testing phase will provide insight into how well the technology works under real-world conditions, the researchers said. Mr. Kozinski said they are considering several sites in Denver for the project, including an area near the airport with heavy freight traffic.

The Colorado pilot will focus on freight-moving vehicles because they emit the most pollution and supporting their shift to electric power could have a big impact on air quality, the developers said.

The charging equipment can either be built into new trucks or affixed to electric vehicles as a retrofit, but it isn’t cheap, experts say. Nor is the technology and construction needed to outfit miles of roadway.

“The cost of retrofitting roads around the country, even if only one lane, would take a big effort and it probably would be pretty expensive,” said Lewis Fulton, director of the Sustainable Transportation Energy Pathways program at the University of California, Davis. Still, he added, “it can work.”

Mr. Fulton said other groups around the world are testing different ways to make electric vehicles competitive with conventional cars and trucks. Some projects have tested stationary wireless charging for passenger buses.

A group in Southern California is building a trolley-like system developed by Siemens AG that relies on overhead electric wires to power freight trucks while they move. Nikola Motor Co. recently unveiled a Class 8 heavy-duty truck powered by a hydrogen fuel cell that it plans to make available in 2020, and on Thursday major trucking company U.S. Xpress Enterprises Inc. announced it has placed an order for the vehicle.

“It certainly is a futuristic concept,” Mr. Fulton said.

Write to Erica E. Phillips at erica.phillips@wsj.com