Yisro was an idol worshipper. In fact, he had worshiped every idol that was known to exist.
How could the Parsha in which the Torah is given be named after an idol worshipper?
The idol worshippers were not fools, at it may seem at first glance. Rather, they were intellectuals, who spent their lives pondering the higher spheres of existence.
So, when Yisro, Priest of Midian, abandoned idolatry and came to the desert, it was an informed decision. And when he said, "Now I know that God is greater than all the other deities" (18:11), he was accrediting Torah with the honor that an esteemed individual testified that Torah is the greatest wisdom of all. In this way, he "handed over" his idol worship to the Torah.
Chasidus teaches that there is a subtle overtone of "idol worship" in any mitzvah that is done for an ulterior motive. The idol worshipper looks to a force other than God, and a mitzvah that is performed without the correct intentions is also an act which is done for a motive other than God's Will.
Obviously, the comparison is an extremely remote one.
Even if a mitzvah is performed far the wrong reasons, or out of rote, it is still a good deed.
But the fact remains that an ulterior motive makes a mitzvah "smell" of idol worship.
Does that mean that a person should stop doing mitzvos if his motive is not pure?
Not at all! A person should always continue to observe the mitzvos, even if his motives are not entirely pure, because eventually he will do them for the right reasons.
Then, he wiII become like Yisro. Because all the good deeds that he performed for the wrong reasons (his former 'idol worship') will be "handed back over" to God.
(Based on Sichas Shabbos Parshas Yisro 5737)