They are definitely related but do not come from Latin.
The root is the old Frankish verb *spehôn (old German spehōną), to observe carefully which gave the French espier and later épier. The related substantives were espie and later épie (spy).
These substantives were superseded by espion under the influence of the Italian spione.
This substantive finally gave a new verb espionner.
Needless to say, the English "spy" is part of the family.