Pennsylvania State Police say Kenneth Ford Hamilton Jr., of the 800 block of Kimberton Road in Phoenixville, was arrested on Sunday.
Police say the investigation began back on October 13th as a trooper conducted undercover surveillance on a file-sharing network.
Within the files recovered was a piece of child pornography, police said.
The file was allegedly traced back to Hamilton's home and a search warrant was executed on November 27th.
At the home, police say, Hamilton allegedly admitted to downloading child porn.
Police say the pieces of child pornography recovered from Hamilton's home include some 160 minutes worth of videos showing children between five and 12 years old being sexually assaulted by adults.
"Viewing child pornography often is one of the early steps along the path to sexually abusing children. Gaining regular access to kids is a second step. A teacher who is accessing child pornography is a recipe for disaster," Chester County District Attorney Tom Hogan said in a news release.
Investigators also questioned his neighbors.
"The police came in and then they were asking about him. 'How is his character' and whether I heard a noise," neighbor Bedrus Lourdusamy said.
The news set off a shockwave among parents when they got an email notice from the school.
"I'm sick to my stomach. When [my daughter] gets home from school, I don't know how I'm going to tell her," parent Renne Marino said
Marino says her daughter will be devastated when she finds out.
She says Hamilton made all the difference when her daughter needed special help.
"She wouldn't be where she is today if it wasn't for him. He helped her in so many ways that other teachers couldn't do," Marino said.
Hamilton has been teaching at Phoenixville Middle School for the past 11 years.
Police and school officials say there's no evidence that he had inappropriate contact with any of the children.
Just last month, the former principal of the middle school was sentenced to two years in jail for possessing hundreds of child porn images.
Troy Czukoski left the district in the summer of 2012 and was principal of Springton Lake Middle School when he was arrested.
"What these people do today, I don't understand. The principal was great, never had a problem with him, my girls never had a problem with him," Marino said.
Hamilton was arrested on Sunday and charged with 13 total felony counts, including the possession and dissemination of child pornography.
He is being held on $250,000 bail with a preliminary hearing scheduled for later this week.