Casillas kept out a Manuel Fernandes spot-kick as Moussa Marega, Hector Herrera and Jesus Corona scored for Porto to overcome an Anton Miranchuk strike for Russian champions Lokomotiv.
Porto moved onto seven points from three matches, two ahead of German side Schalke, who played out a goalless draw with Galatasaray in Istanbul.
“We’ve got three important points,” Porto manager Sergio Conceicao said. “We were always superior in the game. Despite some defensive mistakes because players were a bit overconfident, we fully deserved this win.”
The visitors conceded a penalty just 10 minutes in when Alex Telles brought down Alexei Miranchuk in the area, but the 37-year-old Casillas parried away the attempt from Fernandes.
Telles then blocked efforts from Alexei Miranchuk and Eder in quick succession, before the latter gave away a penalty to Porto after wrestling Felipe to the ground at a corner.
Marega converted to give Porto the lead on 26 minutes, and a second goal swiftly followed as Mexico international Herrera headed in a cross from his compatriot Corona.
The Miranchuk twins soon combined to halve the deficit as Anton drilled home following an assist from his brother Alexei.
But Corona restored Porto’s two-goal cushion on 47 minutes when he took a pass from Yacine Brahimi and hammered the ball into the roof of the net from a tight angle.
Any chance of Lokomotiv rescuing something from the match evaporated when defender Solomon Kverkvelia was sent off with 14 minutes to play after hauling down Herrera.
“We could have won this game but squandered all of our clear chances in the first half,” rued Lokomotiv goalkeeper Marinato Guilherme. “Naturally, we’ve been punished.
“We believed we could still claim the win before we conceded a quick goal after the break. After that it was especially tough to come back.”
For more news your way, download The Citizen’s app for iOS and Android.
Download our app and read this and other great stories on the move. Available for Android and iOS.