It's a question, which atheists often ask. It was on quora: "did we create god or god created us?"
I post my reply here in full, as it is not long:
The question implies that there are two entities: God and me (or us). This is the usual view of the Abrahamic religions, yet it cannot be proven to be true.
India has held a different view since very ancient times.
Advaita Vedanta, (explained in the Upanishads, which form the last (anta) part of the Vedas) postulates that essentially, everything is One (a-dwaita = not two).
“Brahman is not what the eyes can see but That whereby the eyes can see. Brahman is not what the mind can think but That whereby the mind can think…” (Kena Upanishad).
It means Brahman is in us, or rather, we are Brahman. “Ayam Atman Brahman” (the individual consciousness is one with the universal consciousness) is one of the Mahavakyas (great utterances) of Vedanta. “Aham Brahmasmi” is another Mahavakya.
That means ‘God’ is my essence, that is what is really true in me. Sat-chit-ananda – it’s true, conscious and blissful. This is eternal, the same in all. My name and form are impermanent and therefore not absolutely true.
So did I create God or the other way round? In truth, 'I am God' not the Abrahamic notion of a separate entity, but pure, omnipresent consciousness), just temporarily and apparently caught up in a form with a name.
Yet this realisation won’t come by thinking. It comes by sinking into the vast intelligence from where thoughts emerge. Intuition springs from there and true happiness as well.
It is this, our true nature, which we are all seeking in our pursuit of happiness. We won’t find lasting happiness among the names and forms.
Anandamayi Ma once said something like “worldly people feel sorry for sanyasis because they renounce the joys of the world. Those people have no idea what great joy they miss out”.