Both come from the same Proto-Indo-European root, *penkwe, meaning the same, five. (The greek for five also comes from the same: think about pentagon, for example).
The interesting part is this: the p- sound in Proto-Indo-European evolved into the Germanic and then English f- sound. Think about father and padre, for example or foot and pie. Five and cinco follow this pattern too, but in a more subtle way.
The Proto-Indo-European for the same, *penkwe, evolved into the Latin word for “five”: quinque. The qu- was pronounced in a hard way like a k- and then, as Latin evolved into Spanish, the k- was softened into the soft c- in cinco. So p- to k- to c-. You can see it through the similar sounds.
Indeed, the pattern is most obvious in the repetition of the sounds in both works cin-co as the c/k sound twice, at the start of each syllable. And the fi-ve as the f- sound (and its closely related, usually identical and often interchangeable sound of v-) at the start of each of its syllables as well.