The Briton was the star turn of a colourful, 15-minute performance at the Luzhniki Stadium, which featured a duet of 'Angels' with Russian soprano Aida Garifullina, lots of dancers and Brazil's two-time world champion Ronaldo.
Williams, who had been criticised for agreeing to take part in the opening ceremony, changed the lyrics of his song 'Rock DJ' to "but I did this for free" and then surprised a global TV audience by turning to the camera and holding up his middle finger.
He decided not to perform 'Party Like a Russian', the song that lampoons oligarchs.
Despite the ill-mannered sign-off, the Russian crowd appeared to love the 44-year-old's showmanship.
Former Spain captain Casillas lifted the World Cup in 2010 and brought the trophy out before the ceremony, with the 32 flags representing the competing nations unfurled during the the performance of 'Angels'.
- Opinion: Will Russia be the most controversial Football World Cup yet?
- Russia crush Saudi Arabia in opener
- Opinion: Best (and the rest) of Football World Cup 2018
About 800 people were involved in the on-stage activities, which were held closer to kick-off than in recent finals.
Within minutes of Williams leaving the pitch, the real main man here took centre stage - Vladimir Putin.
The Russian president started by welcoming sports fans around the globe to a "splendid football festival in a hospitable and friendly country".
Putin said "Russians love football" and for them it had been "love at first sight ever since the first official game in 1897".
But in a speech that went on a little longer than they usually do on these occasions, Putin made several veiled references to the country's current isolation on the global stage after a series of diplomatic crises.
He talked about "sport's humanistic value" and its power for supporting "peace and understanding between nations".
FIFA president Gianni Infantino spoke next, in Russian, English and Arabic, a gesture that was warmly greeted by both sets of fans, Russian and Saudi Arabian.
"As of today, for one month, football will conquer Russia and from Russia, football will conquer the whole world - enjoy the biggest celebration on earth," Infantino said in English.
The national anthems were then played and sung gustily, handshakes were made and the 2018 World Cup's first game kicked off with a match ball that spent March orbiting the earth in the International Space Station.
The next 32 days are going to be one hell of a ride.