The towering midfield back crashed the weekly club at the Dunedin Public Library on Wednesday, sending the high school pupils and Red Cross volunteers into a state of shock.
The All Blacks are in Dunedin for the second Bledisloe Cup test tomorrow.
Red Cross youth co-ordinator Sakhr Munassar said his college youth resettlement caseworker Eman Ghandour invited the All Black to the homework session via Twitter, but nobody knew if he would turn up.
''We had a strong reaction from the students and the volunteers; there was shock going around everywhere.''
Refugee and Balmacewen Intermediate School pupil Ahmad Al Hussien (13) particularly connected with Williams, Mr Munassar said.
''He [Ahmad] told me after that he had become friends with Sonny Bill and that he would also be famous one day.''
Ahmad's friends had been teaching him how to play rugby.
Not every pupil knew who Williams was at first, but once they heard ''All Black'' they appreciated the significance, Mr Munassar said.
''Some of them did recognise him though, because he visited them when they arrived in Auckland.''
Williams' visit lasted about an hour and he spent one-on-one time with many of the children, Mr Munassar said.
''The visit showed that people do care about them.
''They are young children but they do feel a lot.
''Most of them had been living in Lebanon doing hard labour and he didn't come for me, or Red Cross, he came for them.''