In the Garden of Eden we find that there was: http://en.wikipedia.org/wiki/Tree_of_the_knowledge_of_good_and_evil
Humans ate from it. About this tree God said:
יז וּמֵעֵץ, הַדַּעַת טוֹב וָרָע--לֹא תֹאכַל, מִמֶּנּוּ: כִּי,
בְּיוֹם אֲכָלְךָ מִמֶּנּוּ--מוֹת תָּמוּת. 17 but of the tree of the
knowledge of good and evil, thou shalt not eat of it; for in the day
that thou eatest thereof thou shalt surely die.'
It is a curious situation, because the humans are punished for a sin that they committed before they ate from the tree of Knowledge of Good and Evil. There are several words for "knowing" in Hebrew but the most clear one is "daat", and in this case that is what's used in הַדַּעַת (knowing).
So humans are told the consequences of their action, but it may be said that they did not know the actual reasons for WHY their action is bad. Merely that it was prohibited.
After they ate from the tree, it was said of them:
וַתִּפָּקַחְנָה, עֵינֵי שְׁנֵיהֶם, וַיֵּדְעוּ, כִּי עֵירֻמִּם הֵם;
וַיִּתְפְּרוּ עֲלֵה תְאֵנָה, וַיַּעֲשׂוּ לָהֶם חֲגֹרֹת. 7 And the eyes
of them both were opened, and they knew that they were naked; and they
sewed fig-leaves together, and made themselves girdles.
Now they are able to understand on their own what is desirable and what is not. This is illustrated by their distaste for being naked, without anyone telling them this. They also seem to become ashamed of their state and their actions, and blame each other:
י וַיֹּאמֶר, אֶת-קֹלְךָ שָׁמַעְתִּי בַּגָּן; וָאִירָא כִּי-עֵירֹם
אָנֹכִי, וָאֵחָבֵא. 10 And he said: 'I heard Thy voice in the garden,
and I was afraid, because I was naked; and I hid myself.' יא
וַיֹּאמֶר--מִי הִגִּיד לְךָ, כִּי עֵירֹם אָתָּה; הֲמִן-הָעֵץ, אֲשֶׁר
צִוִּיתִיךָ לְבִלְתִּי אֲכָל-מִמֶּנּוּ--אָכָלְתָּ. 11 And He said:
'Who told thee that thou wast naked? Hast thou eaten of the tree,
whereof I commanded thee that thou shouldest not eat?'
יב וַיֹּאמֶר, הָאָדָם: הָאִשָּׁה אֲשֶׁר נָתַתָּה עִמָּדִי, הִוא
נָתְנָה-לִּי מִן-הָעֵץ וָאֹכֵל. 12 And the man said: 'The woman whom
Thou gavest to be with me, she gave me of the tree, and I did eat.' יג
וַיֹּאמֶר יְהוָה אֱלֹהִים לָאִשָּׁה, מַה-זֹּאת עָשִׂית; וַתֹּאמֶר,
הָאִשָּׁה, הַנָּחָשׁ הִשִּׁיאַנִי, וָאֹכֵל. 13 And the LORD God said
unto the woman: 'What is this thou hast done?' And the woman said:
'The serpent beguiled me, and I did eat.'
What people knew before the Law was given to the Israelites was more limited than the Law. The Law was given to the Israelites specifically -- for example, the circumcision would be the sign of the Covenant God made with the seed of Abraham. Other nations did not need to do this.
http://en.wikipedia.org/wiki/Seven_Laws_of_Noah are traditionally believed to apply to all humans, but the Law was supposed to be for the Israelites.
Before the Law was given to Israelites, we know that people still knew murder was wrong. For example, http://en.wikipedia.org/wiki/Code_of_Hammurabi dates back to the 17th century BC, and codifies what should be done for what actions.
People of all nations were able to learn morality from their parents, and their human nature was able to understand what would hurt others, as well as what their culture considered acceptable or not. The point of the Law was to maintain a special Covenant between God and His People the Israelites.
The Council of Jesus' Church in Jerusalem officially stated as much, in Acts 15:
They specifically addressed Gentile Believers and told them to follow the Noahide Laws, telling them that they don't have to observe the full Jewish law, which was given to Israelites only.