By example. And explanation, and discipline, same as any learning.
However, I would teach moral vs immoral (for me that equates to right vs. wrong) [coincidentally, 4 me the good-evil thing would = order-chaos..i see right/wrong and good/evil as judgement calls applied to situations from generally accepted/presently held perceptions of a thing], with ample field trips. It is one thing to say to a child "because we said so" (a la your example) and another thing to explain "how would you feel if that were done to you? Now think about that whenever you do anything. I love you and i'm here for you". The words of a parent are the words of gods to their children, so one must be stern and loving. (Having the state engender the youth with garbage is mind control a la the Hitler Youth movement, or a la the tribal/religoius control of the middle east on young and unemployed males today).
Respect, courtesy, hospitality, fidelety, courage, honor, and other lessons would follow. The world is a good school in which to study such lessons.
Lemme give you a short lesson plan for "honesty": I take my daughter out for a walk in downtown Inianapolis. I tell her that we will learn a few things about honesty and people. I show her five 5 dollar bills and tell her that while we are walking around the circle or at the mall, I will drop one out periodically in different locations, circimstances, and make it look as if it were an accident, and that we will pretend not to notice the dropped fiver. We will then observe (most likely) that some folks will let you know of your mistake, while others will quietly shuffle the bill into place, and palm it while fiddling with their shoe. We later will discuss our observations, how this is just ans example, how some have differetn 'honesty' thresholds, when not to be honest, etc. In the end, she's on her own.
Keep in mind this is one of many scenarios needed to exemplify such a characteristic as honesty, and an example taken as some sort of statistic or anything more than a social experiment would take this grossly out of context.
My brother had an "Ethics and Engineering" class or two in College for his ME degree. This had more to do with ethical engineering practices than "ethics"
His personal ethics prohibit him from working on any mechanical device intended to harm another, and he would prefer to make cool ass hyper-engineered toys. I'd join him on that venture as a designer. It'd be like we were kids again.
Keith