Cotton began acting at the age of six. His first ever role began in 2006, on the television series Brothers and Sisters, where he portrayed Cooper Whedon. In the same year he appeared as Zeke in the television movie Welcome to the Jungle Gym. His first film was A Dennis the Menace Christmas where he played the lead role of Dennis Mitchell. In 2009, Cotton appeared in the movie Like Dandelion Dust. In 2010, he appeared in two movies, Radio Free Albemuth from the story by Philip K. Dick, and Class. In 2011, he appeared in Mr. Popper's Penguins as Billy Popper. In 2013, he played young Max (Max being played by Matt Damon) in Elysium. He also voices a Civil War teenager Albertus McCreery in the documentary film The Gettysburg Address.