The government has accused Haki Africa and Muslims for Human Rights of having links to Islamist group al-Shabab.
The groups deny the accusation, and say they they are campaigning for the fair treatment of terror suspects.
Despite winning the case, the groups did not have their bank accounts unfrozen, as they had requested.
The High Court in the coastal city of Mombasa said they had failed to cite financial regulators as respondents in the case.
Haki Africa head Khalid Hussein described the ruling as bittersweet.
The court case has attracted much attention in Mombasa, reports the BBC’s Ferdinand Omondi from court.
Last month, the accounts of Haki Africa and Muslims for Human Rights (MHR) were frozen on the orders of the central bank and The Commission on Financial Regulation.
The NGOs have accused security agents of being behind the recent assassination of several radical Muslim preachers around Mombasa.
Kenyan officials deny involvement in the killings.
Kenya’s government in December said it had deregistered 510 NGOs, including 15 suspected of having links with terrorism.
Al-Shabab is headquartered in Somalia, but has recruited fighters in Kenya and has carried out a wave of attacks in the country.