Heka, as well as being the name of magic, was also the name of the god of magic. To clear this up I thought I would include the following piece, which is an excerpt from my book Heka: The Practices of Ancient Egyptian Ritual and Magic:
The word heka can mean several things, each contributing to our understanding of the complexities of ancient Egyptian magic. The function of heka is described in the Instruction for Merikara, the Middle Kingdom teaching of the Pharaoh Amenemhet I (c. 2000 BCE):
“He [Re] gave them [mankind] the heka as a weapon in order to ward off the effect of dangerous events.”
Heka was seen as a gift from the sun god Re to mankind (his offspring), a manifestation of his creative energy as an embodiment of his Ba (his soul). It empowered man to create using words and actions, mirroring the sun god’s creation of the universe. Heka can be seen as the creative force or life-giving energy connecting the objects, links and symbols of life with the universe, like a subtle tapestry of energy, which the magician must learn to read if s/he is to effectively work magic.
Heka is also the inherent magical energy (mana or personal power) found within living beings. Different creatures were perceived as possessing different amounts of heka. The gods had the most heka. The pharaoh (as a channel for the divine energy) also had a lot of heka, as did people who were considered unusual, such as dwarfs and people with birth defects. Red hair was considered a sign of having much heka, due to the magical associations with that colour. And of course the other class of being with a lot of heka was the dead, hence the use of spells calling on the dead to assist with performing rites.
As well as being the term for magic, Heka was a god, indeed he was the god of magic. Or perhaps it would be more correct to say he was magic, being the divine personification of magic. He is sometimes shown in images as appearing among the crew of the solar barque. He was depicted as a bearded man wearing a lion nemes headdress.
Another definition of heka is given in funerary spell 261 of the Coffin Texts, from a Middle Kingdom sarcophagus. The spell is entitled “To become the god Heka”, and reads:
“I am he whom the Lord of all made before duality had yet come into being … the son of him who gave birth to the universe … I am the protection of that which the Lord of all has ordained … I am he who gave life to the Ennead of the gods … come to take my position that I may receive my dignity. Because to me belonged the universe before you gods had come into being. You have come afterwards because I am Heka.”
The hieroglyph used from 1000 BCE to write his name was interchangeable with the concepts of god and power. Visually the hieroglyph depicted the hindquarters of a lion, and may well be linked with his attribution as one of the sons of the lion-headed goddess Sekhmet. In this form he was shown as a young child with a solar disk on his head.
So no, Heka and Hekate are not etymologically related. The only real connection is that they are both associated with magic in their own ways.