Parliament adopted the law in the wake of last week's suicide bombing which killed 26 people. The government requested the legislation to help security agencies make quicker arrests in criminal cases.
Under the law, the interior ministry must collect DNA samples from all 1.3 million citizens and 2.9 million foreign residents. People who refuse to provide DNA samples face one year in jail and a fine of up to $33,000, while those who provide false samples can be jailed for seven years.
The project is estimated to cost the interior ministry $400 million, which parliament approved in emergency funding.
"We have approved the DNA testing law and approved the additional funding. We are prepared to approve anything needed to boost security measures in the country," independent MP Jamal al-Omar told Agence France-Presse.
A suicide bomber blew himself up Friday at a Shiite mosque in the capital. In addition to those who died, 227 people were wounded in the attack, which the so-called Islamic State (IS) terror group claimed responsibility for.
The assailant was identified by IS as Abu Suleiman al-Muwahhid. But Kuwaiti authorities said his real name was Fahd Suleiman Abdulmohsen al-Qabaa, a Saudi born in 1992, AFP reported.
Interior Minister Sheikh Mohammad Khaled al-Sabah told parliament Tuesday that authorities had busted the "terror cell" behind the bombing and arrested at least five suspects, per AFP.
"We are in a state of war. Yes, we have busted this terror cell but there are other cells we are going to strike," Sheikh Mohammad said, adding that Kuwait has revised "all security measures, especially around mosques and all places of worship."