Justice Weldon Korir has declared the Gatundu North parliamentary seat vacant.
The judge ruled that the IEBC should conduct fresh elections for the position.
The judge also directed the Deputy Registrar to forward the ruling to the speaker of the National Assembly for appropriate action.
"I declare that the seat of the MP Hon Anne Wanjiku has become vacant," Korir said.
Judge Korir says the election by Hon Wanjiku was in violation of the law.
In the case, former MP Clement Kungu Waibara had moved to court challenging Wanjiku's election.
The case had moved up to to the Court of Appeal who directed it to be heard afresh.
The Court of Appeal had directed that the case be heard by a constitutional court.
The court had been told that Wanjiku was not qualified to be when she was still a member of a county assembly with a monthly salary and all the other benefits and responsibilities accorded to that position.