Jyrki Katainen, the head of Kanerva's party, said: "This has been the toughest decision as the leader of the party. Ilkka is my friend and he has done his job as foreign minister brilliantly."
Katainen said he thought that Kanerva had acted thoughtlessly in his private life.
The foreign minister has been in trouble in previous years over his mobile phone use.
In 2005, when he was the deputy speaker of parliament, he bombarded two models with text messages.
Katainen said: "He promised he would not repeat such a scandal, but he did not keep that promise".