Even though Okonkwo loves Ikemefuna and in some ways thinks more highly of him than of his own son, Okonkwo participates in the death of Ikemefuna because it has been decreed by the oracle, and he is also scared of being thought to be weak by the other men with him. One of the major aspects of Okonkwo's character is the way that he set himself to be completely different from his father, who was thought to be weak, feminine and not manly enough. Therefore, throughout the novel, Okonkwo deliberately pushes himself to show everybody, including himself, how manly he can be. Note how the text describes the death of Ikemefuna in Chapter VII:
He heard Ikemefuna cry, "My father, they have killed me!" as he ran towards him. Dazed with fear, Okonkwo drew his matchet and cut him down. He was afraid of being thought weak.
What drives Okonkwo to participate in the killing of Ikemefuna therefore is his fear of being perceived as "weak" if he hung back and did not participate. Even though others have counselled him not to be involved in this killing, Okonkwo's fear of what others might think of him and what they might say drives him to kill Ikemefuna, which is an action that will haunt him for some time afterwards.