1-I kicked him running toward the goal.
2-I kicked him running.
3-I kicked him, running toward the goal.
4-I kicked him, running.
In which case:
a-I was running/running toward the goal
in which:
b-he was running/running toward the goal
and which are ambiguous?
Remember - correct capitalisation, punctuation and spacing make posts much easier to read.
Just say "I kicked him while I was running toward the goal" or "I kicked him while he was running toward the goal" and don't make your reader try to guess what you mean by playing with the placement of a comma.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.