"These samples are the 21st century version of fingerprints," Gov. Perdue said in a statment. "We need to give our law enforcement officers the most advanced tools that we can when they head out on the streets."
The bill has been the subject of some debate.
Currently, only those convicted of felonies have had the inside of their cheeks swabbed. But when the new law takes effect, it will allow law enforcement to collect DNA samples from a suspected felon as soon as they are arrested.
Officers will begin taking samples in February.
The sample will be entered into the state DNA database to determine whether the person may be linked to other crimes. The DNA record will be deleted if the person is acquitted or charges are dismissed.
Megan Oberzan is a rape survivor. Five years ago she was attacked by a man with an arrest record.
"Had this been passed prior to my rape, in all likelihood, my rapist would have been in jail on September 25, 2005, and I never would have met him," Oberzan said.
Last month, Oberzan joined Attorney General Roy Cooper at a press conference to support the DNA testing bill.
The ACLU opposes the bill but supporters think it will help convict the guilty, exonerate the innocent and hopefully prevent criminals, like the man who raped Oberzan, from attacking again.