As a teenager he was sleeping in a park and trying to wash his clothes in a river so he would be clean for school.
Matthew Cox was one of too many children who did not get adequate help soon enough, Future Generations Commissioner Sophie Howe has said.
She wants better links between the education system and other agencies to identify adverse childhood experiences.
Mr Cox, now 22 and with a job, had a tough time at school but his problems were first noticed by teachers.
He told BBC Wales education correspondent Caroline Evans what it was like.