The flame which sparked the foundation of philosophy was indeed religion due to its thought-provoking nature. Later on, ancient Greek philosophers began to see religion as distanced and irrational and they wished to explain things with reason rather than religion. Early philosophers remained estranged from religion but with moral philosophy, the intersection between the two was recreated.
In Plato’s dialogue Euthyphro, he made an effort to bring some closure to this subject by posing the question ‘Is the pious loved by gods because it is pious, or is it pious because of the love it?’. Simply put, he asked whether we determine morality ourselves and make it a part of religion or whether religion is what determined morality. Plato included in his explanation, his theory of Forms, suggesting that we have some instinctive idea of good and evil by nature. This vocation remained a matter of deep thought and interest for medieval Islamic and Christian philosophers.