MoonKnight was first dreamt up by Doug Moench and Don Perlin in 1975 for Marvel's Werewolf by Night (#32) comics. As Spector has dissociative identity disorder, he switches back and forth from a few different personalities. In that same sense, he also has held quite a few different jobs over the years: Spector has worked as a Marine, a boxer, as well as a member of the CIA. Though he ultimately came to dislike the companies that he worked for, he decided to continue on by working as an operative—except this time, he was going more on a freelance route.
In one specific instance, he found himself left for dead in the deserts of Egypt after engaging with a terrorist named Bushman. In what he felt was some force of nature, Spector survived, crediting his survival to Khonshu, an Egyptian moon god that he stumbled upon in statue form while near death.
Transformed by this experience, Spector headed back home to the U.S. and decided to create an entirely new identity—one that he had a bit more control over: Moon Knight. But just because you decide to create a superhero identity for yourself doesn't mean that you'll actually have any superpowers. Sure, Spector is an extremely skilled boxer and has been tactically trained as part of the CIA, but those are just strengths, not powers.
It turns out that Spector has a bit more to credit to give to Khonshu than just his own survival and a new identity. As he sank further into being Moon Knight, Spector started developing some unexplainable abilities that are occasionally linked to the moon phases. For one, his strength hits maximum levels when there's a full moon, which plays into other uses of that energy. Just as Moon Knight receives more energy for strength, he can also take that very same strength away from others through fighting. There's also a more mental side of his powers, which comes through in dreams and with other psychological visions, revealing things that might help him out in the future.