He remained at Penske for the 2017 season. Castrovenes began with his third successive pole position at the Grand Prix of Long Beach; electrical problems left him ninth. He led the first 73 laps of the Desert Diamond West Valley Phoenix Grand Prix for fourth after winning pole. Castroneves began from a career-low 19th in the Indianapolis 500, moving through the field to finish second after a late race duel for the win with Takuma Sato. He earned his 50th pole position in the Kohler Grand Prix at Road America, and went on to lead 214 laps in his first victory in 54 races in the Iowa Corn 300. Castroneves finished no lower than eighth in the next five races, and entered the season's final race, the Grand Prix of Sonoma 22 points behind championship leader and teammate Josef Newgarden and 19 behind Dixon. A victory and Newgarden finishing third or lower and Dixon second or worse would give Castroneves the title. He finished in fifth place to be fourth overall with 598 points.