The General National Congress -- Libya's parliament -- passed the law Sunday following armed March protests demanding passage of the legislation, CNN reported Monday.
A committee was created to decide which officials are subject to the ban, which takes effect in 30 days, CNN said.
Hanan Salah, Human Rights Watch's Libya researcher, said the law is flawed because it excludes officials who may not have been corrupt.
"(The law) violates human rights and Libya's provisional constitution because it allows for guilt by association rather than provable misdeeds. The provisions and procedures for exclusion are overly broad and vague. The desire to ban corrupt and abusive officials is understandable, but this law is deeply flawed," Salah said.
Others worry the law creates a dangerous precedent in which armed protesters can force the government to create laws based on intimidation, CNN reported.
"The events of last week have set a number of precedents -- the precedent that using arms to force the government to adopt a law or policy; the precedent of establishing non-equality of citizenship before the law, in effect creating classes of Libyans; and the principle that in the new Libya, people can and will be judged on the basis of general classification, not individual responsibility," said Hafed al-Ghwell, a former Gadhafi opposition figure.
Celebrity Families of 2014 [PHOTOS]