Williams began his acting career at age four. He later starred in Little Bill as the voice of Bobby, briefly replacing Devon Malik Beckford in 2000, and played himself (or aner") on the children's show Sesame Street from 2002 to 2005. He rose to fame in 2005 by playing the title character in the hit series Everybody Hates Chris, which finished in 2009. He won a Young Artist Award in 2007 for his work on the show. He has also been a guest star in Two for the Money, Law & Order: Special Victims Unit, and the show Hi-Jinks. In late 2009, Williams appeared in the second season of True Jackson, VP as True's love interest Justin "Lil' Shakespeare" Weber in the two-part episode "Flirting with Fame".
In 2012, Williams got the role of Owen in the series Go On. He also played the lead role of Cyrus DeBarge in the Disney Channel Original Movie Let It Shine alongside Coco Jones, Trevor Jackson, and Brandon Mychal Smith. Williams was also featured on nine songs on the film's soundtrack, showing off his rapping skills. The movie premiered on June 15, 2012, and his songs "Don't Run Away", "Me and You", "Guardian Angel", "Let It Shine", and "Moment of Truth" all received airplay on Radio Disney. The videos were also played frequently on the Disney Channel. Williams also stars in the Disney XD series, Lab Rats.