Pigot has spent the past two seasons as the road and street course driver for ECR. Next season he will get the full schedule and take over the No. 21 Chevrolet currently driven by J.R. Hildebrand.
All but four of Pigot's 21 IndyCar starts have been with ECR. He was the 2015 Indy Lights champion.
"It's nice to know that they believe in me and I can provide them with the results that they want," Pigot said, according to IndyCar's official website. "There's no other team I want to be with right now. I definitely enjoy working with ECR, and I was really hoping I would get to continue with this team."
Carpenter said it was "an exceptionally hard decision" to replace Hildebrand, who has two top-three finishes in 2017.
Veach will drive the No. 26 car for Andretti. The 22-year-old finished third in the Indy Lights series in 2014. He was 26th in his Indianapolis 500 debut this year.
"Zach works hard, and he takes something away from every time he's in the car -- he's constantly improving," team CEO Michael Andretti said in a statement. "He's put the effort in, found success at every level and now his dream has come full circle."
Pigot has attended every oval event with ECR since joining the team in 2016. He has been on Carpenter's timing stand during each practice and qualifying session and has watched Carpenter race the ovals from the spotter's stand.
His best finish this season was an eighth-place result at Long Beach.
The Associated Press contributed to this report.