Appeals Court sitting in Mombasa on Thursday overturned High Court ruling that had upheld Lamu Senator Anwar Loitiptip's victory in February.
The Jubilee senator becomes the first MP to lose a petition in appeal court after three other colleagues were reinstated.
The court ordered Independent Electoral and Boundaries Commission to conduct fresh elections in the small coastal county.
Wiper Democratic Movement's Hassan Albeity filed the petition after having his earlier attempt thrown out by High Court Judge Asenath Ongeri in February.
Judge Ongeri had ruled that the petitioner failed to submit evidence in time and ordered each party to bear costs.
So close was the race that the two candidates were only separated by only 58 votes in August elections.
Would you like to receive news updates for free? WhatsApp the word NEWS to 0790870842