The 10 commandments were told to Moses by god. Moses wrote down the commandments in Exodus 20.
Moses went up onto a mountain to speak with God. Moses' people were worshiping idols and God didn't like this. God gave Moses two tablets of rules, which were the Ten Commandments.
The Ten Commandments were said to have been delivered to Moses by God on Mount Sinai, as described in the book of Exodus. Moses received these guidelines verbally, and they were later inscribed on stone tablets. The commandments serve as fundamental ethical principles in Judaism and Christianity.
;