Are humans biologically wired to lie? It seems that people create morals and decree that lying is bad. Yet everyone has lied before. Why is this?
Young children often learn how to lie before they have truly developed a sense for what it is, or why it may be unethical. This is demonstrated by the propensity for children to tell exaggerated and implausible lies, as young children may not yet have a sense of social cognition (or 'theory of mind'), and thus do not yet understand what others may find believable.
A child who examines another adult lying will understand that the adult is not telling the truth, but will see that the achieved effect is often in favor of the liar. Thus they will learn that disguising the truth can achieve a certain (often favorable) result. Like all negative behavior, if the child learns that lying has more negative consequences than positive ones, they will be less quick to demonstrate the behavior.
Despite recognizing it as an unethical behavior, people may still choose to lie out of fear, or to defend from the consequences of truth telling. Lying can also be a pro-social attitude to spare the feelings of another, thus avoiding conflict and preserving civility in human relationships.
From a neurobiological standpoint, there may be parts of the brain that influence the decision to lie. One study showed that pathological liars had increased white matter volumes in certain regions (namely the orbitofrontal, inferior frontal, and middle frontal cortices). 
 Yang, Y., Raine, A., Narr, K., Lencz, T., LaCasse, L. Colleti, P., Toga, A. (February 2007). "Localisation of increased prefrontal white matter in pathological liars." British Journal of Psychiatry, 190, 174–175.