Thomas Perez Jewell, 54, admitted to sexually molesting two minors and to producing child pornography of the molestation, according to the U.S. Attorney's office.
Jewell had been employed by Contra Costa County as a youth mental health counselor intern and worked at the Juvenile Hall in Martinez.
He also had a private practice where he worked as a youth counselor.
Jewell was arrested on Friday when law enforcement executed a search warrant at his home on suspicion of possession of child pornography.
He is scheduled to be sentenced Feb. 29 and is facing a sentence of 15 to 30 years in prison.
In accordance with state and federal law, Jewell will be required to register as a sex offender.